|
|||||||
| Register | FAQ | Links Dir | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
what should i do to give alert box for invalid security code??
I am trying to do form validation through javascript and captcha using php.
when i try to alert for ivalid security code, i cant see the alert box. if icode is correct, page is redirecting to the next page. what should i do to give alert box for invalid security code?? my form code is Code:<input type="submit" name="submit" value="submit" onclick="chk();"> chk is a javascript function Code: function chk() { alert("<?php chk1(); ?>"); } it is calling a function named chk1. it is php function Code: <?php function chk1() { if( $_SESSION['security_code'] == $_POST['security_code'] ) { echo 'Thank you.code is valid'; header("Location: process.php"); } else { print "enter correct security code";
__________________
Angioplasty |