SyntaxFix
Write A Post
Hire A Developer
Questions
try this
session_start(); $name = $_GET["username"]; $sql = "SELECT 'id' FROM Users WHERE username='$name' LIMIT 1 "; $result = mysql_query($sql) or die(mysql_error()); if($row = mysql_fetch_assoc($result)) { $_SESSION['myid'] = $row['id']; }