Chris M
07-03-2002, 06:04 PM
<?php
error_reporting(7);
register_globals;
$templatesused='gg_guessword,gg_guessword_intro,gg _guessword_message,gg_guessword_guess,gg_guessword _tries';
require('./global.php');
// Variables (start)
eval("$yourguess(\"".gettemplate('gg_guessword_guess')."\");");
eval("$gwtries(\"".gettemplate('gg_guessword_tries')."\");");
//Start Guessword
function rand('$num');
$num = array( "blagh", "whoo", "whee", "hello", "testing" );
$guessword == $num;
$message= "";
$num_triesgw= ( isset( $num_triesgw ) ) ? ++$num_triesgw : 0;
if ( ! isset( $guess ) )
eval("$gwintro(\"".gettemplate('gg_guessword_intro')."\");");
elseif ( $guess != $num )
eval("$message(\"".gettemplate('gg_guessword_message')."\");");
else { //must be equal to
header( "Location: hooray.php" );
exit;
}
$guess = (int)$guess;
eval("dooutput(\"".gettemplate('gg_guessword')."\");");
?>
Here is the php I am trying to use...
I want the $num variable to be the word to guess...
I tried to use a rand() function to get it to choose from the array of words setup in the $num array, but I get a parse error...
Please can you tell me how I can get it to select a word from a list every 24 hours, in a completely random fashion?
Satan
error_reporting(7);
register_globals;
$templatesused='gg_guessword,gg_guessword_intro,gg _guessword_message,gg_guessword_guess,gg_guessword _tries';
require('./global.php');
// Variables (start)
eval("$yourguess(\"".gettemplate('gg_guessword_guess')."\");");
eval("$gwtries(\"".gettemplate('gg_guessword_tries')."\");");
//Start Guessword
function rand('$num');
$num = array( "blagh", "whoo", "whee", "hello", "testing" );
$guessword == $num;
$message= "";
$num_triesgw= ( isset( $num_triesgw ) ) ? ++$num_triesgw : 0;
if ( ! isset( $guess ) )
eval("$gwintro(\"".gettemplate('gg_guessword_intro')."\");");
elseif ( $guess != $num )
eval("$message(\"".gettemplate('gg_guessword_message')."\");");
else { //must be equal to
header( "Location: hooray.php" );
exit;
}
$guess = (int)$guess;
eval("dooutput(\"".gettemplate('gg_guessword')."\");");
?>
Here is the php I am trying to use...
I want the $num variable to be the word to guess...
I tried to use a rand() function to get it to choose from the array of words setup in the $num array, but I get a parse error...
Please can you tell me how I can get it to select a word from a list every 24 hours, in a completely random fashion?
Satan