Well it's a bit more complex than a simple value.
First of all:
PHP Code:
$makekey=drawBoard($key);
The drawBoard fuction code is:
PHP Code:
function drawBoard($board)
{
global $boardD,$title;
$puzzle="";
$puzzle.="<table align='center' border='0' cellpadding='5' cellspacing='5'><caption><h3>$title</h3></caption>";
for ($i=0;$i<$boardD['height'];$i++){
$puzzle.="<tr><font align='center'>";
for ($j=0;$j<$boardD['width'];$j++){
$puzzle.="<td><center>{$board[$i][$j]}</center></td>";
}
$puzzle.="</tr></font>";
}
return $puzzle;
}
I also tried giving $makekey an easy value such as "lalala" and I didn't have the same problem. (It didn't print lalala on the wordgame.php page)
Will try and figure out if the error is somewhere else in the code. Until now I only though I had sth wrong with the escape code.
Thanx for replying
PS. I tried the approach you noted ACJavascript by using :
PHP Code:
print "<input type='hidden' name='makekey' value="'.$makekey.'"></form>";
Which returned a parse error. Tried it like this:
PHP Code:
print "<input type='hidden' name='makekey' value=".'$makekey'."></form>";
But had the same results as if I had used print ' ' , instead of " ". (variables didn't parse)
Last edited by SNP : 01-29-2005 at 07:59 AM.
|