is it better to pass the form variable on the end of a url, and use the post method, or store the variable in a hidden field?examples-
function reply_form() {
global $MID;
if(!isset($MID)) {
echo "Please select a message to reply to.";
}
else {
$query = mysql_query("SELECT * FROM questions WHERE MID='$MID' && Reply='0'", $link_id);
if (!$query) {
echo "Sorry, this message is either non-existent or is no longer available.";
}
else {
while ($myrow = mysql_fetch_array($query)) {
$Subject = $myrow[Subject];
$Question = $myrow[Question];
?>
<p><font size="5" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Reply to a Question</b></font></p>
<form action="replytoquestion.php?action=reply" method="post">
Subject: <? echo $Subject; ?>
<p>In Reply to:<br>
<i>"<? echo $Question ?>"</i><br>
<textarea name="Question" cols="50" rows="12" tabindex="1"></textarea></p>
<input type="hidden" name="MID" value="<? echo $MID ?>">
<p><input type="submit" name="submit" value="Submit" tabindex="2"></p>
</form>
<?
}
}
}
}
or should it be done like so-
function reply_form() {
global $MID;
if(!isset($MID)) {
echo "Please select a message to reply to.";
}
else {
$query = mysql_query("SELECT * FROM questions WHERE MID='$MID' && Reply='0'", $link_id);
if (!$query) {
echo "Sorry, this message is either non-existent or is no longer available.";
}
else {
while ($myrow = mysql_fetch_array($query)) {
$Subject = $myrow[Subject];
$Question = $myrow[Question];
?>
<p><font size="5" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Reply to a Question</b></font></p>
<form action="replytoquestion.php?action=reply&MID=$MID" method="post">
Subject: <? echo $Subject; ?>
<p>In Reply to:<br>
<i>"<? echo $Question ?>"</i><br>
<textarea name="Question" cols="50" rows="12" tabindex="1"></textarea></p>
<p><input type="submit" name="submit" value="Submit" tabindex="2"></p>
</form>
<?
}
}
}
}
Thanks for your responses!