Hi all,
I have a problem with my database entry. The form I created works just fine, but whenever the user enters a " (quotation mark) in one of the text areas the database entry stops and cuts everything that follows. I think that's because the " is interpreted by mysql.
How can I change that? addslashes function?
Thanks very much.
I have a problem with my database entry. The form I created works just fine, but whenever the user enters a " (quotation mark) in one of the text areas the database entry stops and cuts everything that follows. I think that's because the " is interpreted by mysql.
How can I change that? addslashes function?
Thanks very much.
Hi Burner,
I don't have time to hunt it down right now but this has come up once before here. A Google search of the forums might find the thread, it was more than six months ago IIRC.
Bob
I don't have time to hunt it down right now but this has come up once before here. A Google search of the forums might find the thread, it was more than six months ago IIRC.
Bob
Thanks Bob. I searched the forums and found two approaches:
This one
and this one:
Appreciating your help very much
Burner
This one
I changed the Autogenerated code to read "'".addslashes($_POST['textarea_1'])."'"
and this one:
The $_POST['field_name'] code was for Joomla 1.0.x (though it should still work in Joomla 1.5).
Each entry is like this
Code: Select all
'".JRequest::getVar('nom','', 'post', 'string', '' )."'
you can replace this with
Code: Select all
'".addslashes(JRequest::getVar('nom','', 'post', 'string', '' ))."'
Notice the )) near the end.
Appreciating your help very much
Burner
OK. I just learned that I cannot change the autogenerated code. What can I enter in the OnSubmitCode to apply addslashes? any suggestions?
thanks
thanks
This topic is locked and no more replies can be posted.