thefollower Posted November 28, 2007 Share Posted November 28, 2007 I have a get url which isn't working when the code checks if its clicked I don't know why though... this is what i got: <div id="bv_" style="position:absolute;left:550px;top:273px;width:203px;height:24px;z-index:10" align="center"> <font style="font-size:21px" color="#FFFFFF" face="Arial"><b><u><a href="viewprofile.php?profile=<?=$_SESSION['Current_User']?>">View My Profile</a></u></b></font></div> Then: If (isset($_GET['profile'])){ $UserID = mysql_real_escape_string($_GET['profile']); Echo $UserID; } The url shows: viewprofile.php?profile=1 So it has the correct ID number.. but my if statement isn't check it properly.. Link to comment https://forums.phpfreaks.com/topic/79308-get-url-problem/ Share on other sites More sharing options...
Distant_storm Posted November 28, 2007 Share Posted November 28, 2007 you need to have session_start() somewhere before you refer to the session. Link to comment https://forums.phpfreaks.com/topic/79308-get-url-problem/#findComment-401437 Share on other sites More sharing options...
pocobueno1388 Posted November 28, 2007 Share Posted November 28, 2007 you need to have start_session() somewhere before you refer to the session. They said the URL was showing up fine, so obviously that is not the problem, plus this probably isn't their entire code. I don't see any problems with what you have. Maybe post more of the script. Link to comment https://forums.phpfreaks.com/topic/79308-get-url-problem/#findComment-401438 Share on other sites More sharing options...
Silverado_NL Posted November 28, 2007 Share Posted November 28, 2007 Is the mysql_real_escape_string function working??? I cant see anything wrong with your if statement so my guess is that it might be the function. maybe its expecting an array instead of a normal value! and do you have error reporting switched on??? if not place this code in the top of your page. <?php ini_set('error_reporting', E_ALL); ini_set('display_errors', TRUE); ?> hope this will help's you out a bit Link to comment https://forums.phpfreaks.com/topic/79308-get-url-problem/#findComment-401439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.