Hi,
I've currently got the following code:
Right now, this generates the HTML as expected.. with the three hidden fields with the right information.PHP Code:echo "<form name=\"AdminStuff\" action=\"newPost.php\" method=\"POST\">\n";
echo "<div class=\"hr\"> <hr /> </div>\n";
echo "<h1>" . $heading . "</h1>\n";
echo "<p>" . $content . "</p>\n";
echo "<span class=\"postinfo\"> Posted by " . $poster . " on " . $date . "\n";
echo "<input type=\"hidden\" name=\"heading\" value=\"$heading\">\n";
echo "<input type=\"hidden\" name=\"content\" value=\"$content\">\n";
echo "<input type=\"hidden\" name=\"postID\" value=\"$postID\">\n";
echo " [ <a href=\"newPost.php\" onClick=\"AdminStuff.submit(); return false;\">Edit</a>\n";
echo " | <a href=\"removePost.php\" onClick=\"AdminStuff.submit(); return false;\">Remove</a> ]\n";
echo "</span>\n";
echo "</form>\n";
However, in newPost.php, the $_POST array is empty.
The code for newPost.php is as follows:
Any ideas? If there's any easier way, please let me know. I need the link to be a hyperlink, and to send the data with POST (not GET).PHP Code:echo "<form method=\"post\" action=\"generatePost.php\" action=\"POST\">";
echo "<textarea name=\"heading\" cols=\"40\" rows=\"1\">";
echo $_POST['heading'];
echo "</textarea><br>";
echo "<textarea name=\"body\" cols=\"40\" rows=\"5\">";
echo $_POST['content'];
echo "</textarea><br>";
echo "<input type=\"submit\" value=\"Submit\" />";
echo "<input type=\"hidden\" value=\"" . $_POST['postID'] . "\">";
echo "</form>";
Thanks
-Rob




Reply With Quote