UK SEO ForumsCalendarContact Us

Go Back   UK SEO Forums > Webmaster > Programming
Register FAQ Links Dir Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2009, 05:04 AM
rathurosamal rathurosamal is offline
SEO Baby
 
Join Date: Jul 2009
Posts: 2
iTrader: 0
rathurosamal is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT +1. The time now is 11:55 PM.
vBSkinworks

UK SEO