Hello. I have the script below that creates a list of random alphanumeric combinations. include('db_connect.inc.php'); function md5this($length,$limit){ while ($length<$limit){ set_time_limit(0); $charset = "abcdefghijklmnopqrstuvwxyz0123456789"; // Do not edit beyond this point! for($i=0;$i<strlen($charset);$i++) $x[]=$charset[$i]; for($i=0,$z="",$e="echo ";$i<$length;$i++){ $z.="foreach(\$x as \$y[$i])"; $e.="\$y[$i]."; } $evalinsert = eval($z.$e."\"<br />\";"); $length++; } } mysql_query("INSERT INTO `md5Sums` ( `id` , `anValue`, `md5Sum` ) VALUES ( NULL , '$evalinsert', '".md5($evalinsert)."' );") or die(mysql_error()); Code (markup): I know that it is connecting to the database and inserting data, but not the data that it is producing in my browser. It inserts a blank for anValue and a random hash for the md5Sum. Is there any one that knows what I should do, or how to rewrite the script to allow it as an array. Script output is http://tylerperroux.com/md5.php Any help is much appreciated. Thank you an advance.
Now the scope for $evalinsert is only inside the function "md5this" .So use $evalinsert as global and try .
Thanks for the fast response. Never got anything from PHPFreaks. Thank you Sorry for that. It is called by md5this(1,3) And just to be sure is this how you set a global variable. $GLOBALS['$evalinsert']; Just not sure. I have never had to set any globals. Thanks you