PDA

View Full Version : The Guessing Game - Version 1.2 - HELP!


Chris M
06-25-2002, 10:23 AM
I tried to insert a random script, but something went wrong...

I want it to use the variables $num1, $num2, $num3, $num4 and $num5, which are set to words, and then take a random one every 24 hours...

Here is the php...Can you tell me what I need to change?

<?php
error_reporting(7);
register_globals;

require('./global.php');

//Start Guessword
rand("$num");
function num("$num1, $num2, $num3, $num4, $num5");
$num1 = "testing";
$num2 = "test";
$num3 = "whoo";
$num4 = "whee";
$num5 = "dah";
$message= "";
$num_triesgw= ( isset( $num_triesgw ) ) ? ++$num_triesgw : 0;
if ( ! isset( $guess ) )
eval("$message(\"".gettemplate("gg_guessword")."\");");
elseif ( $guess != $num )
eval("$message(\"".gettemplate("gg_guessword_wrong")."\");");
else { //must be equal to
header( "Location: hooray.php" );
exit;
}
$guess = (int)$guess;
?>

Satan