darthmill Posted August 17, 2008 Share Posted August 17, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/120089-solved-php-and-send-a-command-via-flash-button/ Share on other sites More sharing options...
DeanWhitehouse Posted August 17, 2008 Share Posted August 17, 2008 add a die statement to the query Quote Link to comment https://forums.phpfreaks.com/topic/120089-solved-php-and-send-a-command-via-flash-button/#findComment-618640 Share on other sites More sharing options...
darthmill Posted August 17, 2008 Author Share Posted August 17, 2008 Thanks it worked I`m new to php and sql as u can tell I thought the die statement had to have something after it. Opps Julian Quote Link to comment https://forums.phpfreaks.com/topic/120089-solved-php-and-send-a-command-via-flash-button/#findComment-618668 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.