Loading...
 
Development

Development


Inserting or updating text with ?

posts: 80 Austria

Hi!
I have problems inserting data from a text field into the DB. Everything works fine until i enter a ? nayhwere in the field an try to save it.
Example:
I enter in my textfield: "test2 ?"
My query looks like: $wquery="UPDATE `Testbed_EQN` SET `Name` = '$TeNameN' WHERE `EQN` = ?";
then i get an error like this:
UPDATE `Testbed_EQN` SET `Name` = 'test2 'E001' >' WHERE `EQN` =

Could this be solved with preg_replace?
Or how would you do it?
Thank you!

There are no comments at this time.