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]

- Jason


Jay Blanchard wrote:

[snip]
I have a form that post some data to a DB. After the post, I send it back to another page with a named anchor like this:


<a name="comments">Comments</a>

By way of a URL that looks like this:

http://www.domain.com/index.php?mode=view&id=100&#comments
or
http://www.domain.com/index.php?mode=view&id=100#comments

Using Mozilla Firefox .08, .09, Netscape 5+, and Mozilla 1.7 this will show a blank page. If I use IE, I notice a longer pause since adding the

named anchor, but it will still work.

Any ideas about PHP having issues passing a named anchor?
[/snip]

Can we see some code?

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to