Form Validation Using PHP

This is a simple set of php codes that can be used for validating a comment form. step 1 – Test for Database Connectivity <?php $con=mysql_connect(“localhost”,”username_of_database”,”password_of_database”); if(!$con){ die(‘could not connect:’.mysql_error()); } mysql_select_db(“name_of_database”, $con) ?> step 2 – Type in the Comment Form <form id=”form” name=”form” method=”post” action=””> <p> <label for=”name”>Name</label> <input name=”name” type=”text” id=”name” size=”40″ […]

Switch to our mobile site