RE: [PHP] Named anchors, POST failure
| From: | Jay Blanchard | Date: | Thu, 29 Jul 2004 17:18:17 +0000 |
| Subject: | RE: [PHP] Named anchors, POST failure | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-192218@lists.php.net to get a copy of this message | ||
[snip]
Sure.
This is my function for posting a comment via the form I mentioned
previously:
[code]
case "post_comment":
// SQL to insert new psot into DB //
$sql = "INSERT INTO table(value1, value2, value3)
VALUES ('" . $_POST["value1"] . "',
'" . $_POST["value2"] . "',
'" . $_POST["value3"] . "')";
$result = mysql_query($sql)
or die ("inserting_values:".mysql_error());
// Grab the ID so we can refer to it later //
$id = mysql_insert_id();
// Redirect back to comments page //
echo"<script>window.location.href='index.php?mode=view&id=$id&#comments'
;</script>";
break;
[/code]
[/snip]
When you redirect you have to pull the comment from the database for it
to display. Are you doing that?