Jump to content

[SOLVED] why won't it pick up the $id


jeppers

Recommended Posts

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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.