Jump to content

Sorting input before mysql insertion


graham23s

Recommended Posts

Hi Guys,

 

i'm having a bit of trouble with the proper way to do this! i have a description field where users can write a description about themselves say:

 

<?php
$des = $_POST['description'];
?>

 

i was wanting to write a small function to do all the usual stuff! stripslashes,nl2br etc but im not sure what i need to do in regards to making the input ready? i need new lines to be breaked instead of \n\r

 

can anyone advise me on the functions i would need to make the input safe and ready! i know i need mysql_real_escape_string.

 

cheers guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/112789-sorting-input-before-mysql-insertion/
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.