please help me : security and required fields with php

i need help in this form

[CODE]

* title:

* Url

description

[/CODE]

first :

i want make fields required “at lest Three letters” using php not java …

but i want the user don’t leave the form if this fields empty …

and i need the user don’t go the add.php if this fields empty

like :: please fill the blank fields

second :
some time my users post in the in fields …something like this

[CODE][/CODE]

or something like this

 <a href=""</a>

and some time user write one letter in the field
i don’t accept this …because it makes problems in the results…
so what can i do to fix this and make security for this .
so can anyone help me …please

Hi there,

If it helps, the following is how to check the length of a string

PHP
[php]strlen($variable) > 3
[/php]

JavaScript

document.getElementById('testfield').value.length > 3

Sponsor our Newsletter | Privacy Policy | Terms of Service