JS related query

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 : *
 
[/php]
hi here i provide you little code as per your requirement. you can modify more as you want

[php]
//Save below code as test.html and run this file.
//When you type other SR it will alert and change css of input box and focus cursor to that particular text box.

[/php]

i hope this will helpful for you.
reply your feedback.
~SR~

Sponsor our Newsletter | Privacy Policy | Terms of Service