MySQL Forums :: PHP :: Text box security


Advanced Search

Text box security
Posted by: David Simpson ()
Date: February 06, 2011 12:30AM

Hey guys. I put an about me text in the register portion of a website. I want to know if this is good enough security for it.The text box:

<p>About Me:
<textarea type="textbox" name="aboutme" cols="60" rows="5" maxlength="160" value="<?php if (isset($trimmed['aboutme'])) echo $trimmed['aboutme']; ?>"></textarea></p>



I'm using this to clean it:

if (preg_match ('/^[0-9A-Za-z \'.-]{0,160}$/i', $trimmed['aboutme'])) {
$fantasy = mysqli_real_escape_string ($dbc, $trimmed['aboutme']);
}

It's going into the database, and it's not a required field.

Thank you very much :)

Options: ReplyQuote


Subject Written By Posted
Text box security David Simpson 02/06/2011 12:30AM
Re: Text box security Rick James 02/08/2011 11:02AM
Re: Text box security David Simpson 02/08/2011 02:27PM
Re: Text box security manoj seo 02/10/2011 03:10AM
Re: Text box security Jon Dickinson 02/08/2011 06:57PM
Re: Text box security David Simpson 02/08/2011 07:49PM
Re: Text box security Peter Brawley 02/08/2011 08:21PM
Re: Text box security David Simpson 02/08/2011 10:21PM
Re: Text box security Jon Dickinson 02/08/2011 11:52PM
Re: Text box security David Simpson 02/09/2011 11:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.