jeppers Posted January 2, 2009 Share Posted January 2, 2009 i am not sure why it won't pick up the id from but it is now starting to get to me so could someone please have a look at this code and maybe tell me where i am going wrong i have 2 pages one where the user can change the oprion in a menu sytem and one where it retives the data using the $id. hear is the code and the user id from the <?php //retrive the users information $query = "SELECT food_id, title, description, price FROM foods WHERE food_id=$id"; $result = @mysql_query($query) or die(mysql_error()); if (mysql_num_rows($result) == 1){//valid id show form //get the users information $row = mysql_fetch_array($result, MYSQL_NUM); hear is the id it is ment to pick up http://localhost//edit_food.php?id=43 so what to do can you help Quote Link to comment Share on other sites More sharing options...
micmania1 Posted January 2, 2009 Share Posted January 2, 2009 You need to use $_GET['id'] Quote Link to comment Share on other sites More sharing options...
jeppers Posted January 2, 2009 Author Share Posted January 2, 2009 is there any chance you can point me in correct direction, in my code to help me wright that code in so it works. Quote Link to comment Share on other sites More sharing options...
jeppers Posted January 2, 2009 Author Share Posted January 2, 2009 sorry i am so stuiped i just missed that all out.......... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.