Jump to content

[SOLVED] Can Someone tell me why This Script doesn't work?


Keptsoul

Recommended Posts

<?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)

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

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.

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.