I want that after validation fails then the color of text box should turns to red color how can i do it with java script?plzz help me.
[php].
<?php session_start(); $_SESSION['views']=1; ?> Register <?php include("config.php"); if(isset($_POST[submit])) { $name=mysql_real_escape_string($_POST['name']); $course=mysql_real_escape_string($_POST['course']); $rollno=mysql_real_escape_string($_POST['roll']); $email=mysql_real_escape_string($_POST['email']); $password=mysql_real_escape_string($_POST['password']); $select = "select * from survey"; $fetch1 = mysql_query($select); $query1 = mysql_fetch_object($fetch1); $email1 = $query1->email; if($email1 == $email) { echo "This email id already exists
"; } else { $query="insert into survey set name='$name', course='$course', roll=$rollno,email='$email',password='$password'"; $result=mysql_query($query); echo "Congratulation!! you are successfully registered.
"; } } ?>Name : | *(Required field) |
Course : | * |
Roll No : | * | Email : | * |
Password : | * |