Jump to content

Recommended Posts

hey guys is it possible to do this?

 

like(cause i can't explain the srting if it is the real name..lol)

 

link :http://site.ca/admin/GymGraph/grapht.php?id=4,trainer=mike

 

 

$trainer= mysql_escape_string($_GET['trainer']); 
$id = mysql_escape_string($_GET['id']); 

$sql = "SELECT *  
FROM `$trainer`  
WHERE `id`= $id"  
; 
$res= mysql_query($sql); 
$row= mysql_fetch_assoc($res);?>  

 

i changed it to

 

mysql_real_escape_string  and still nothing.

 

it is as soon as i pass 2 infor in the link it does not work..

 

 

Link to comment
https://forums.phpfreaks.com/topic/134926-mysql_escape_string/
Share on other sites

so with & works if i remove the space..

this is my link to the file

<a href="grapht.php?trainer=<? echo $row['trainer']?>&id=<? echo $row['id'] ?>" target="_blank">

 

in the browser it gives

 

http://site.ca/admin/GymGraph/grapht.php?trainer=mike%20&id=4

 

the %20

Link to comment
https://forums.phpfreaks.com/topic/134926-mysql_escape_string/#findComment-702678
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.