techker Posted September 30, 2008 Share Posted September 30, 2008 hey guys my query works fine like this $q = "SELECT * FROM events"; $res = mysql_query($q); $row = mysql_fetch_assoc($res); echo (empty($row['d'])? "empty": "not empty"); now when i add a link to a page that will show the description in deatails i add $id=$_POST['id']; $q= "SELECT * FROM events WHERE id = ".$_GET['id']." LIMIT 1 ,30 "; $res= mysql_query($q); $row= mysql_fetch_assoc($res); the get it..it give my empty all the time? Link to comment https://forums.phpfreaks.com/topic/126502-get-id-not-working/ Share on other sites More sharing options...
dropfaith Posted September 30, 2008 Share Posted September 30, 2008 This works for me when i use it $id = mysql_escape_string($_GET['id']); $query = "SELECT * FROM business WHERE id = '$id'"; Link to comment https://forums.phpfreaks.com/topic/126502-get-id-not-working/#findComment-654178 Share on other sites More sharing options...
techker Posted September 30, 2008 Author Share Posted September 30, 2008 and works for me to!lol thx buddy..do you know what i was doing wrong? Link to comment https://forums.phpfreaks.com/topic/126502-get-id-not-working/#findComment-654191 Share on other sites More sharing options...
dropfaith Posted September 30, 2008 Share Posted September 30, 2008 you were using post here instead of get $id=$_POST['id']; $id = mysql_escape_string($_GET['id']); Link to comment https://forums.phpfreaks.com/topic/126502-get-id-not-working/#findComment-654194 Share on other sites More sharing options...
revraz Posted September 30, 2008 Share Posted September 30, 2008 Not really, since he never used $id. Link to comment https://forums.phpfreaks.com/topic/126502-get-id-not-working/#findComment-654205 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.