Po długim boju udało mi się wyodrębnić kod, który powodował błędy, ale za nic nie potrafię zrozumieć dlaczego akurat tam jest błąd i co jest źle.
Funkcja, która nie chce zadziałać w PHP5
<?php
function formspacer() {
return '<tr><td style="padding: 0px" bgcolor=#bbbbbb colspan=2>
<img src="panel/img/spc.gif" height=1 border=0></td></tr>';
}
function add_ksiega(){
<form name="ksiega" onsubmit="return Validate();" action="index.php?cmd=ksiega&op=dodaj" method="POST" class="text">
<table width="95%">'.formspacer().formspacer().'
<tr bgcolor=#efefef><td align=right width="160">
<b class=tb_row>E-mail:</b></td><td align=left>
<input type="text" name="email" size="13" maxlength="30" class="inputbox"/>
</td></tr>'.formspacer().'
<tr bgcolor=#efefef><td align=right width="160">
<b class=tb_row>Gadu-Gadu:</b></td><td align=left>
<input type="text" name="gg" size=30" maxlength="7" class="inputbox"/>
</td></tr>'.formspacer().'
<tr bgcolor=#efefef><td align=right width="160">
<b class=tb_row>Adres www:</b></td><td align=left>
<input type="text" name="www" class="inputbox" size="30" maxlength="30"/>
</td></tr>'.formspacer().'
<tr bgcolor=#efefef><td align=right width="160"><b class=tb_row>Dodał:</b>
</td><td align=left>
<input type="text" name="dodal" size="30" maxlength="30" class="inputbox"/>
</td></tr>'.formspacer().'
<tr bgcolor=#efefef><td align=right width="160">
<b class=tb_row>Text:</b></td><td align=left>
<textarea name="wpis" rows="5" cols="30" class="inputbox"></textarea>
</td></tr>'.formspacer().'
<tr bgcolor=#efefef><td colspan="2"><center>
<input type="submit" value="Wpisz się" class="button"/>
<input type="reset" value="Wyczyść" class="button"/>
</center></td></tr>'.formspacer().'</table></form></center>';
}
?>
a to część funkcji wywołująca ten kod:
<?php
case 'ksiega';
include_once 'mod/gbook.inc.php';
{
echo '<table><tr><td width="105" height="35px" align="center"> <a href="index.php?cmd=ksiega&op=nowy"><b>Dodaj Wpis</b></a></td>
<td width="15" height="35px"></td><td width="105" height="35px"></td>
</tr></table><table width="100%">';
ksiega($book_limit);
}
if ($_GET['op'] == 'nowy')
{
add_ksiega();
}
break;
?>
Proszę o pomoc bo zaraz z tym oszaleje.