Dreamweaver Text Form Help

mitch2234

New Member
Hello there,
I have a question about creating text forms in Adobe Dreamweaver. I would like to be able to make it so only specific information entered in a text form will link to an access page while any other information entered will redirect to an error page.

For instance, let's say I want the specific information to be "abc". Whenever I enter "abc" in the text form, I want to be able to access a linked page. However, I want any other information entered in the field to redirect to an error page.

Thanks in advance!
 

websonalized

New Member
you indicate what you want in the process.php file as an if statement

example:

<form name="input" action="process.php" method="post">
Enter the right info: <input type="text" name="right_info" />
<input type="submit" value="Submit" />
</form>

process.php

if ($_POST['right_info'] = "abc"){

then...

} else {

header( 'Location: http://www.yoursite.com/new_page.html' ) ; }
 
Top