Re: Named anchors, POST failure

From: Date: Thu, 29 Jul 2004 17:12:20 +0000
Subject: Re: Named anchors, POST failure
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192213@lists.php.net to get a copy of this message
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?


« previous php.general (#192213) next »