Jump to content

scaping single quote


corillo181

Recommended Posts

It depends on what you want to do with the string. There's the function [a href=\"http://www.php.net/addslashes\" target=\"_blank\"]addslashes()[/a] that's good for most purposes. If you're going to be insterting the data into a mysql database, you should use the [a href=\"http://www.php.net/mysql_real_escape_string\" target=\"_blank\"]mysql_real_escape_string()[/a] function.

Ken
Link to comment
https://forums.phpfreaks.com/topic/10548-scaping-single-quote/#findComment-39344
Share on other sites

ye sit worked life saver :)

one mroe thing ken..

i got a lost password scrip but whe the person enters the email that they got in the database.. mysql has problems reading the @ sign.. show as a syntax error.. error in '@whatever.com in my scrip i just passthe email as a variable..
Link to comment
https://forums.phpfreaks.com/topic/10548-scaping-single-quote/#findComment-39348
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.