ctcp Posted March 19, 2011 Share Posted March 19, 2011 this is my scrip php js <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- <?php include_once 'common.php'; require_once("pages/validation.php"); ?> <? if (!$_COOKIE["ln"]){ $data['lang_ch']=$data['DefaultLanguage']; setcookie("ln", $data['lang_ch']); } ?> --> <script type="text/javascript" src="ajax/jquery.js"></script> <link rel="stylesheet" type="text/css" href="style.css" /> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="css/1.css" rel="stylesheet" type="text/css" /> </head> <body> <? include ('pages/menu.php') ?> <div id="container"> <div id="inner_container"> <div id="content"> <?if( isset($_POST['send']) && (!validateName($_POST['name']) || !validateEmail($_POST['email']) || !validateMessage($_POST['message']) ) ):?> <div id="error"> <ul> <?if(!validateName($_POST['name'])):?> <li><strong><?= $errorname?></strong> <?= $errorname1?></li> <?endif?> <?if(!validateEmail($_POST['email'])):?> <li><strong><?=$errormail?></strong> <?=$errormail1?></li> <?endif?> <?if(!validateMessage($_POST['message'])):?> <li><strong><?=$errormessage?></strong> <?=$errormessage?></li> <?endif?> </ul> </div> <?elseif(isset($_POST['send'])):?> <div id="error" class="valid"> <ul> <li><strong><?=$congratulations?></strong> <?=$congratulations?></li> </ul> </div> <p> <?endif?> </p> <form method="post" id="customForm" action=""> <div> <label for="name"><?= $name; ?></label> <input id="name" name="name" type="text" /> <span id="nameInfo"><?= $yourname; ?></span> </div> <div> <label for="email"><?= $email; ?></label> <input id="email" name="email" type="text" /> <span id="emailInfo"><?= $yourmail; ?></span> </div> <div> <label for="country"><?= $countrys; ?></label> <select name="country"> <option value="AF">Afghanistan</option> <option value="AX">ÅLand Islands</option> <option value="AL">Albania</option> </select> </div> <div> <label for="message"><?=$message?></label> <textarea id="message" name="message" cols="" rows=""></textarea> </div> <div> <input id="send" name="send" type="submit" value="<?=$submit;?>" /> </div> </form> </div> <script type="text/javascript" src="ajax/jquery.js"></script> <script type="text/javascript" src="ajax/validation.js"></script> </body> </html> </div> </div> </div> </body> </html> how to allow 5 submits per IP per day and how to after if email name is ok go to insert.php ? i try use this for redirect but not work <meta http-equiv="refresh" content="2;url=pages/insert.php"> if i use action="pages/insert.php"> inserts work but didn't check the fiels if email or name is right thank you for your time and im sorry for my english ... Quote Link to comment Share on other sites More sharing options...
ctcp Posted March 20, 2011 Author Share Posted March 20, 2011 can sombady help me please? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.