Jump to content

Mysql_escape_string


techker

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

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.