Jump to content

Anchor includes into the $_get variable


ted_chou12

Recommended Posts

Hi, i have a page, the link looks like this:

http://domain.com/page.php?var=val#anchor, but the anchor seems to be included into the var varaible, so it reads like val#anchor altogether, the page looks like:

$user = $_GET['user'];
$user = strtolower($user);
require("../mysqlconnection.php");
$read = mysql_query("SELECT displayname FROM usercus WHERE username='$user'");
$r = mysql_fetch_array($read);
$dname = $r['displayname'];
if ($dname == "") {$invalid = true;
$title = "ErrorDocument 404";}
else {$status = file("storage/$user.txt", FILE_IGNORE_NEW_LINES);
list($lastmoddate, $title1, $banner, $bgcolor, $bgimage, $bgwatermark, $font, $textcolor, $datecolor, $order, $header, $footer, $authority) = explode(";seDp#", $status[0]);
$title = "$dname's Blog";}?>
<title><?php echo $title;?></title>

There are some redundant codes, (can be ignored)

Thanks,

Ted

Link to comment
https://forums.phpfreaks.com/topic/176639-anchor-includes-into-the-_get-variable/
Share on other sites

If you have multiple number-signs in the url, then all but the last segment following the number sign, would be part of the GET variables ( I think ).

 

As far as I know, that is controlled by the web-server (i.e. apache). But I've never heard of apache having this problem... What web server are you using ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.