Jump to content

[SOLVED] Carrying variables across.


matty

Recommended Posts

Hi,

 

I need a bit of help with a macro checker im trying to code.

 

Heres the code

if($verify == "crimes" & $vn == ""){

$checknumber = rand(1,;


echo"
$checknumber<br>
<center>
<img src=image/macrocheck.jpg alt=Macro check border=0 usemap=#Map />
<map name=Map id=Map>
  <area shape=rect coords=119,78,142,130 href=macrocheck.php?verify=crimes&vn=8 alt=8 />
  <area shape=rect coords=82,77,105,129 href=macrocheck.php?verify=crimes&vn=7 alt=7 />
  <area shape=rect coords=47,77,70,129 href=macrocheck.php?verify=crimes&vn=6 alt=6 />
  <area shape=rect coords=8,76,31,128 href=macrocheck.php?verify=crimes&vn=5 alt=5 />
  <area shape=rect coords=117,17,140,69 href=macrocheck.php?verify=crimes&vn=4 alt=4 />
  <area shape=rect coords=80,17,103,69 href=macrocheck.php?verify=crimes&vn=3 alt=3 />
  <area shape=rect coords=42,16,65,68 href=macrocheck.php?verify=crimes&vn=2 alt=2 />
  <area shape=rect coords=7,16,30,68 href=macrocheck.php?verify=crimes&vn=1 alt=1 />
</map>
</center>
";
exit;
}

if($vn == $checknumber){

$addmacro = mysql_query("update userdb set macrocheck = 'Y' where id='$playerinfo[id]'");

header( 'Location: crimes.php' ) ;

}
else{   


echo"Invaild choice, this has been recorded. $checknumber";

}

 

What i want to do is carry the variable $checknumber from the first IF statement to the second.

How can i do this WITHOUT putting into the link with $vn?

 

Thank again, Matt

Link to comment
https://forums.phpfreaks.com/topic/40886-solved-carrying-variables-across/
Share on other sites

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.