first I am very new to php so speak slowly and use little words 🙂
I have a basic text box redirect.
the user enters their domain and and they are taken to a specified page in that domain.
this one works fine:
<pre><?
function myform() {
global $PHP_SELF;
?>
<form action='<? echo $PHP_SELF; ?>' method='post'>
<input type='text' name='myurl'>
<input type='submit' value='submit' name='submit'>
<input type='hidden' value='go' name='action'>
</form>
<?
}
if (! $action) { myform(); }
else if ($action == "go") { header("Location: http://$myurl/users/webmail/cgi-bin/WebMail/index.cgi"); }
?>
</pre>
ok when I try to put it in a html table it tells me: header already sent.....
this one does not work:
<pre>
<table border="1" width="100%" height="542">
<tr>
<td width="100%" height="96"></td>
</tr>
<tr>
<td width="100%" height="25"></td>
</tr>
<tr>
<td width="100%" height="403">
<p align="center"><?
function myform() {
global $PHP_SELF;
?>
<form action='<? echo $PHP_SELF; ?>' method='post'>
<input type='text' name='myurl'>
<input type='submit' value='submit' name='submit'>
<input type='hidden' value='go' name='action'>
</form>
<?
}
if (! $action) { myform(); }
else if ($action == "go") { header("Location: http://$myurl/users/webmail/cgi-bin/WebMail/index.cgi"); }
?></td>
</tr>
</table>
</pre>
can anyone tell me why it does not work in a table?
thanks!