Mysql not saving slashes
2 replies to this topic
Posted 23 August 2006 - 09:42 PM
I have this strange problem of saving file name.
I want to save the path of the file just uploaded.
The variable $uploadfile contains the whole path for the file as :
The problem is that my query written below does not save the '\' , even if i use addslashes it completely ignores it. any idea how can i save slashes in mysql?
$sql2="update adverts set login='$uploadfile'";
Posted 23 August 2006 - 10:01 PM
Use addslashes on the uploadfile variable:
$sql2="update adverts set login='" . addslashes($uploadfile) . "'";
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users