Jump to content

Problem with mysql_real_escape_string and filereference


Recommended Posts

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

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?

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.

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.