I have the following code, but when I echo $url, $id2 or $message, the variables come out to be empty. The php action file has no problem and is working. Just a note that this is being echoed using php, and is displayed just fine.
<form name="comment" method="post" action="comment.php" onSubmit="return form_Validator(this)">
<table width=\"100%\">
<tr>
<th colspan=\"2\">Title</th>
</tr>
<tr valign=\"top\">
<th scope=\"row\"> </th>
<td><div align=\"center\"><textarea class=\"formtext\" tabindex=\"4\" id=\"message\" name=\"message\" rows=\"10\" cols=\"50\"></textarea></div></td>
</tr>
<tr>
<td> </td>
<td><div align=\"center\"><input type=\"submit\" name=\"post\" class=\"submit\" value=\"Comment\" /></div><br />
</td>
</tr>
</table>
<input type=\"hidden\" name=\"submit\" value=\"true\">
<input type=\"hidden\" name=\"url\" value=\"$url\" />
<input type=\"hidden\" name=\"id2\" value=\"$id2\" />
</form>
Clarification: Problem is that the variables I am sending to the php function turn out to be empty. There is nothing in them. I looked in the other answered questions for the similar problem, and someone mentioned that rewrite rules can mess with the $_POST stuff. Is that true? Do I have to have something else in the htaccess to allow the variables to be transferred?
Also, PHP file:
<?php
if (userinfo['userid']!=0) {
$url = $_POST["url"];
$id2 = $_POST["id2"];
$email = $_POST["email"];
$message = $_POST["message"];
// These return nothing:
echo $url;
echo $id2;
echo $message;
$sendcomment = mysql_query("INSERT INTO comments SET tutorialid='$id2', email='$email', comment='$message', date=now()");
if($sendcomment){
header("Location: $url");
} else {
// Do Nothing
}
} else {
header("Location: 403.php");
}
?>