Keptsoul Posted October 23, 2007 Share Posted October 23, 2007 <?php /* Find the Needle (find_the_needle.php) */ $rank_check = 1; $page_title = "Find the Needle"; include "header.inc.php"; $findFingerPrizes = fetch("SELECT * FROM find_needle WHERE game = '$game'"); if (!$findFingerPrizes[prize]) { $findFingerPrizes[prize] = "500"; } if (!$findFingerPrizes[x1_location]) { $findFingerPrizes[x1_location] = "143"; } if (!$findFingerPrizes[y1_location]) { $findFingerPrizes[y1_location] = "155"; } if (!$findFingerPrizes[x2_location]) { $findFingerPrizes[x2_location] = "56"; } if (!$findFingerPrizes[y2_location]) { $findFingerPrizes[y2_location] = "45"; } if (!$findFingerPrizes[x3_location]) { $findFingerPrizes[x3_location] = "49"; } if (!$findFingerPrizes[y3_location]) { $findFingerPrizes[y3_location] = "209"; } print $openHTML; if ($act == "play") { points("$game", "$username", "-10"); if (($x == "$findFingerPrizes[x_location]") AND ($y == "$findFingerPrizes[y_location]")) { points("$game", $username, "5000"); } print "x - $x and y - $y"; } if (!$act) { ECHO <<<END <p>Welcome to "Find the Needle" the object of this game is to try to find the needle in those piles of leaves over there. If you can find it there is a great prize involved It costs 10 $pointVar per play!</p> <p align=center> <form action=find_the_needle.php?act=play method=post> <INPUT TYPE=image SRC="images/games/Find_the_Needle/20autumn19.jpg " WIDTH=250 HEIGHT=238 ALIGN=bottom> <form> </p> END; } ?> All I get is the x and y locations when clicking on the image if anyone knows how to fix this please let me know. (edited by kenrbnsn to put in tags) Quote Link to comment Share on other sites More sharing options...
play_ Posted October 23, 2007 Share Posted October 23, 2007 Everywhere you have this: !$findFingerPrizes[x1_location], change it to (!$findFingerPrizes['x1_location']. You need the quotes. assuming it's pulled from the database. if not, put a $ in front of it. Quote Link to comment Share on other sites More sharing options...
Keptsoul Posted October 23, 2007 Author Share Posted October 23, 2007 Parse error: syntax error, unexpected ';' in /home/willowg/public_html/find_the_needle.php on line 13 Did what you aid and got this? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted October 23, 2007 Share Posted October 23, 2007 Which browser are you using? MSIE only returns the x & y coordinates when you use an image for a submit button in the form of $_POST['submit_x'] & $_POST['submit_y']. Firefox returns $_POST['submit']. Ken Quote Link to comment Share on other sites More sharing options...
Keptsoul Posted October 23, 2007 Author Share Posted October 23, 2007 I am working in IE which is where I usually do and it just comes back with the x and y locations so I don't think it's doing what it is supposed to. It is supposed to pull prized from the other game mentioned and give them to the user upon finding the needle in the haystack. If you can help me figure this out it would be great. Quote Link to comment 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.