fi Posted October 25, 2008 Share Posted October 25, 2008 I have problem with get correct file name string with use of mysql_real_escape_string function, example: I get $image_name = $_FILES['file']['name'] and $image_name= mysql_real_escape_string($_FILES['file']['name']) with same bad result. If I have filereference to "Les Demoiselles d'Avignon [1907].JPG" or "Goat's Skull, Bottle, and Candle [1952].JPG", with above example I only get : "Avignon [1907].JPG" and "s Skull, Bottle, and Candle [1952].JPG" I need save this type of file name in data base. Any help, are good arrive, Thank in advance Quote Link to comment https://forums.phpfreaks.com/topic/130116-problem-with-mysql_real_escape_string-and-filereference/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 25, 2008 Share Posted October 25, 2008 It is likely that everything is present and that you need to output the information differently. Have you checked directly in the database using a tool like phpMyAdmin and have you done a "view source" in your browser when you output these to see what is actually present? Quote Link to comment https://forums.phpfreaks.com/topic/130116-problem-with-mysql_real_escape_string-and-filereference/#findComment-674742 Share on other sites More sharing options...
fi Posted October 26, 2008 Author Share Posted October 26, 2008 Results show above are saved to data base from php code. My problem is translate correct file name to database field with mysql_real_escape_string or some thing like that. Filereference $_FILES['file']['name'] is Request from Flex Application to php script. If I pass string with correct fiel name, with all special characters, mysql function in php script not put whole file name in database field, only shorted string: I get this from Filereference (sound in my local drive) > Les Demoiselles d'Avignon [1907].JPG and, script only get Avignon [1907].JPG, so, mysql function not get characters before " ' " : Les Demoiselles d'. Mysql manual show examples for this problem, but function don't work fine. Quote Link to comment https://forums.phpfreaks.com/topic/130116-problem-with-mysql_real_escape_string-and-filereference/#findComment-674762 Share on other sites More sharing options...
fenway Posted October 27, 2008 Share Posted October 27, 2008 Then magic quotes is probably also at play. Quote Link to comment https://forums.phpfreaks.com/topic/130116-problem-with-mysql_real_escape_string-and-filereference/#findComment-675934 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.