...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);


Profile image!
By: Stephen

  Reply to How To Backslash Entries Going Into A Database

  Receive Our Newsletter

Learn PHP picture



Questions about Learn PHP:

Ask question

More Articles:
How to stop annoying keyboards
Ideas for free gifts for your customers
How to stop spam emails