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
https://forums.phpfreaks.com/topic/139186-solved-why-wont-it-pick-up-the-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.