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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.