Jump to content

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

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.