Jump to content

[SOLVED] PHP and send a command via flash button.


darthmill

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

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.