hello,
looking for php form script with redirect pages features.
also need to capture data into either txt file or mysql database.
when user input info, like name, email, address, etc..
and several options like link1, link2, link3..
and click submit.
script need to capture info like name, email, address into mysql database
and depends on options that user choose,
if link1, need to redirect to url1
if link2, need to redirect to url2
if link3, need to redirect to url3.
anybody know this kind a script?
try this script
<?php $add=$_POST['add']; $name=$_POST['name']; $redirect=$_POST['redirect']; //connect to db first - this is a sample query mysql_query("insert into users (`id`,`name`) values ('','$name');"); if($redirect) { header('Location: '.$redirect.''); } ?> <form name="form3" action="2.php" method="post"> <table width="95%" border="0"> <tr> <td width="20%">Your Name </td> <td><input type="text" name="name" /></td> </tr><tr> <td><span>Redir</span> </td> <td><select name=redirect> <option value="http://www.msn.com" selected>Msn</option> <option value="http://www.google.com">Google</option> <option value="http://www.yahoo.com">Yahoo</option> </td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit" /> <input type="hidden" name="add" value="1"> </td> </tr> </table> </form>
Leave a Reply
You must be logged in to post a comment.