...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Backslash Entries Going Into A Database

Computing : Learning PHP

If you are putting data into a database, then most beginners find that things can go awry when adding apostrophes - ' - to the database.

Remember to backslash before putting in the database:
$mydata = addslashes($mydata);

when you take out from the database and want to present back to the user, remember to remove them:
$mydata = stripslashes($mydata);


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Backslash Entries Going Into A Database

  Receive Our Newsletter




Questions about Learn PHP:

Ask question

More Articles:
How to boost business with podcasting
How to use your URL in AdWords
How to Download Available Updates