Jump to content

Mysql not saving slashes


may

Recommended Posts


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 :

$uploadfile='E:\mydata\pop.jpg';

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'";
$rs2=mysql_query($sql2);
Link to comment
https://forums.phpfreaks.com/topic/18480-mysql-not-saving-slashes/
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.