Sedang Disiapkan

Simple PHP/Javascript form validation

I need a simple form validation, written both in Javascript and PHP.

A form contains some textfields, some checkboxes, and textarea. What the script has to do, is:

1. Check if the first textfield TITLE is empty. If it is empty, display another HTML ROW - under the row with the the textfield, with message like "Please fill this field.".

2. Check if checkboxes are selected. User can select minimum 1 and maximum 3 checkboxes. The script has to do that limitations. When page loads, no checkbox is selected by default.

If no checkbox is selected, display another HTML ROW - under the row with the the checkboxes, with message like "Please fill this field.".

3. The textarea field - user can enter maximum 1000 characters. The textarea has to have some basic formatting options above it - Bold, Italic, Underline.

Content of this textarea is inserted into MySQL database, and it has to be in HTML format (for later possibility to view it in browser).

But user must be limited to only use Bold, Italic, Underline, and all ENTERs in text must be converted into .

I must be able to do some other options in the future, for example links , or something else, like .

The script must check if user entered anything into the textarea.

If it is empty or incorrect, display another HTML ROW - under the row with the the textarea, with message like "Please fill this field.".

4. The Postal code fields. It has to do some basic validation, to allow only numbers to be entered. It must check if the fields are filled properly.

If it is empty, display another HTML ROW - under the row with the the textfields, with message like "Please fill this field.".

After all the fields are checked, the data is sent to [url removed, login to view] file, and this file inserts all values into the MySQL database.

The [url removed, login to view] file must also validate, if the data is in proper format, to disallow any security threats. If something is wrong, user must be redirected to the form (with fields filled as user did), and some messages must be displayed about what is incorrect.

If the form file, and the [url removed, login to view] file validates that everything is fine, then data is added to database (i have this part already, so don't worry about it).

Kemahiran: Javascript, PHP, Sekuriti Web

Lihat lebih lanjut: php javascript form validation, php javascript validation, check validation checkbox php javascript, form validation javascript php mysql, javascript textarea empty, check textarea empty javascript, javascript form validation checkbox, javascript check textfield empty, javascript fill textarea, simple javascript form validation, validate php javascript, javascript check textarea empty, php simple form validation, simple file database, php checked checked, is incorrect, html code for javascript, data enters, max char textarea validation php, javascript form security, javascript check textarea filled, javascript validate form php, formatted textarea php javascript, checkbox minimum maximum validation javascript, form validation textarea

Tentang Majikan:
( 20 ulasan ) Szczecin, Poland

ID Projek: #92830