Witam,
Mam cos takiego:
function test($string)
{
return $string.' - to jest test';
}
echo("
<p>
<label></label>
</p>
<table width=\"426\" border=\"0\" align=\"center\">
<tr>
<td><textarea name=\"rezultat\" cols=\"55\" rows=\"15\" id=\"rezultat\"></textarea></td>
</tr>
<tr>
<td><strong>Wy¶lij polecenie shella:</strong></td>
</tr>
<tr>
<td><label>
<input name=\"shell_polecenie\" type=\"text\" id=\"shell_polecenie\" size=\"45\">
</label>
<label>
<input name=\"shell_wyslij\" type=\"button\" class=\"style2\" id=\"shell_wyslij\" value=\"Wy¶lij\" onClick=\"document.main_form.elements.rezultat.value = '<b><--tutaj wynik funkcji test dla document.main_form.elements.shell_polecenie---></b>';\">
<input name=\"id\" type=\"hidden\" id=\"id\" value=\"shell\">
</label></td>
</tr>
</table>
<p> </p>
");
Czyli: mam prosty formularz, sklada sie z edita, buttona i textarea. Do edita wpisujemy polecenie, ktore jest interpretowane przez funkcje w php, nastepnie wynik dzialania tej funkcji ma byc zapisany do textarea.
Jak probowalem to rozwiazac (nieskutecznie), widac - pytanie jak to zrobic prawidlowo?