Tak aj s tymto by som potreboval pomoct pretoze ja tam chybu nevidim.. stale mi vypisuje chybu: Warning: wordwrap() expects parameter 1 to be string, resource given in C:wwwWEBadd_game.php on line 54
Script vypada takto:
?
...
echo'<tr><td align="left"><input type="text" name="subor" class="login_form" maxlength="20"></td></tr>';
echo'<tr><td align="left" class="small_intab_orange"><input type="checkbox" name="Game">Flash Game</td></tr>';
echo'<tr><td align="left" class="small_intab_orange"><input type="checkbox" name="Anim">Flash Animation</td></tr>';
echo'<tr><td align="left" class="small_intab_orange" colspan="2">Info:</td></tr>';
echo'<tr><td><textarea name="info" cols="60" rows="4" class="koment" wrap="hard"></textarea></td></tr>';
...
if(isset($_POST["Game"]))
{
echo'<table align="center">';
echo'<tr><td nowrap align="center" class="small_intab_white">Hra bola ?spe?ne pridan?</td><tr>';
echo'<tr><td nowrap align="center"><a href="index.php" class="smallhyp_o">Home</a></td><tr>';
echo'</table>';
$info = WordWrap($info, 100, " ", 1);
$info = Str_Replace("<","<",$info);
$info = Str_Replace(">",">",$info);
$info = Str_Replace("n","",$info);
MySQL_Query("INSERT INTO flash_games VALUES('','$subor','$info')");
echo MySQL_error();
}
else if(isset($_POST["Anim"]))
{
echo'<table align="center">';
echo'<tr><td nowrap align="center" class="small_intab_white">Hra bola ?spe?ne pridan?</td><tr>';
echo'<tr><td nowrap align="center"><a href="index.php" class="smallhyp_o">Home</a></td><tr>';
echo'</table>';
$info = WordWrap($info, 100, " ", 1);
$info = Str_Replace("<","<",$info);
$info = Str_Replace(">",">",$info);
$info = Str_Replace("n","",$info);
MySQL_Query("INSERT INTO flash_anim VALUES('','$subor','$info')");
echo MySQL_error();
}
Opat neviem kde je problem pretoze tu istu fciu pouzivan v inom scripte a tam to fici v poho...??:error:?