Forum Moderators: coopster
echo '
<form name="form1" method="post" action=url.php?id=$forumid>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td align="left" valign="top">Title:</td>
<td><input name="title" type="text" id="title" value=""></td>
</tr>
<tr>
<td align="left" valign="top">Message:</td>
<td><textarea name="topictext" id="message" cols="40" rows="10" size="40" value="<br><br><br><br><br>" tabindex="10080"></textarea></td>
</tr>
<tr>
<INPUT type="hidden" name="forumid"
value="$forumid">
<td align="left" valign="top"> </td>
<td><input type="submit" name="Submit" value="Add Topic"></td>
</tr>
</table>
</form>
';
}
else
{
header('URL');
exit();
}
?>
In the form action= part, it wont input to requested value $forumid, it just stays as $forumid? I can't figure this one out. THanks.
watch this
<?
session_start();
if (isset($_COOKIE['id']))
{
$forumid = $_REQUEST['forumid'];
?>
<form name="form1" method="post" action=url.php?id=<? echo $forumid;?>>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td align="left" valign="top">Title:</td>
<td><input name="title" type="text" id="title" value=""></td>
</tr>
<tr>
<td align="left" valign="top">Message:</td>
<td><textarea name="topictext" id="message" cols="40" rows="10" size="40" value="<br><br><br><br><br>" tabindex="10080"></textarea></td>
</tr>
<tr>
<INPUT type="hidden" name="forumid"
value="<? echo $forumid;?>">
<td align="left" valign="top"> </td>
<td><input type="submit" name="Submit" value="Add Topic"></td>
</tr>
</table>
</form>
<?
}
else
{
header('URL');
exit();
}
?>