matty Posted March 2, 2007 Share Posted March 2, 2007 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 More sharing options...
wildteen88 Posted March 2, 2007 Share Posted March 2, 2007 Use sessions instead. If you don't want to pass $checknumber in the url. Link to comment https://forums.phpfreaks.com/topic/40886-solved-carrying-variables-across/#findComment-197997 Share on other sites More sharing options...
matty Posted March 2, 2007 Author Share Posted March 2, 2007 Works with sessions, thanks. Link to comment https://forums.phpfreaks.com/topic/40886-solved-carrying-variables-across/#findComment-198004 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.