This is about an ad site ... I use PHP and MySql to insert records into db.
I have an HTML form and users must fill out this form in order to continue.
The following is the form input and validation at each input (javascript):
Name (only letters allowed)
Phone (only numbers allowed)
Email (special match email-regexp)
Title (no special characters are allowed, everything else is fine. By special characters I mean !(#)<> Etc. Maximum length is 35 characters.)
Text (Same as title, no length limit)
Price (only rooms allowed)
I am doing mysql_real_escape_string() in the Header and Text , but nothing else.
My question is simple, is that enough?
I have no other security measures .
UPDATE
var alphaExp = /^[a-zA-ZåäöÅÄÖ\s\-]+$/; var numExp = /^(?=(?:\D*\d){0})[\d -]{0,20}$/; var num_only = /^[0-9]+$/; var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/; var textExp = /^\s*([\wåäö\-\*][^\w]*){3}.*$/gmi; var headlineExp = /^[\s\da-zA-ZåäöÅÄÖ&()+%\/*$€é:,.'"-]*$/;
javascript html security php mysql
user188962
source share