heres exactly what my 2.php script is:
Code: Select all
<?
echo "$id"
?>but when i put
localhost/2.php?id=hello
it says its undefined!
i dont know if i have register_globals on or off. could this be a problem? should i check?
Moderator: General Moderators
Code: Select all
<?
echo "$id"
?>Code: Select all
$sql = "SELECT * FROM articles WHERE user_id=".$_GETї'id'];
$result = mysql_query($sql) or die(mysql_error());Code: Select all
$result = mysql_query("SELECT * FROM articles WHERE user_id=$_GETї'id']", $db);Code: Select all
$sql = "SELECT * FROM articles WHERE user_id={$_GETї'id']}";