Jump to content

Get url problem


thefollower

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.