Jump to content

Recommended Posts

I have a site www.ultimate-futurama.com and i have a small problem. I put a link into my flash button but I would like to add ?id=25 to the address so it shows bios.php?id=25 as the link. The prob i have is it only uses the bios.php and the code after it. I need it because I am getting info from a database but when the page first loads up i get an sql error but as soon as u click on a character link it works. I was hoping to cheat and use the bios.php?id=25 to pull up a record instead of working out why i had the error.

 

this is the code i`m using.

 

$age = $_GET["id"];

echo $age;  //for testing only.

 

$result = mysql_query("SELECT * FROM bios WHERE age = $age");

 

i also tried declaring $age = 25 at the top of the page but no luck. . I think i may need an if statement but not sure how to code it so $age = $_GET["id"]; is not overridin each time.

 

Julian

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.