Jump to content

marriedman624

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by marriedman624

  1. Thanks for the help. It is working great now. I would like to change it up and use header redirect but I don't know how to do that. Can you tell me how? Which way do you recommend and why? Thanks again.
  2. Hello, I'm a very new to php and I am trying to put together a form where a password is entered and based on the password, a page of pictures/proofs is loading (different page for different passwords). I have done a lot of research but can't get it to work. I have to following codes for my form and my php page. When I click submit on the form it only loads the first webpage (/farley). If the password is left blank it loads that page and no matter what i type in the password it loads that page. Any help would be appreciated. Also, if you could explain what you changed and what that change does I would appreciate it so i can learn how to do it myself. Thanks <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php if($pass = "farley" || "Farley"){ echo '<script language="Javascript">'; echo 'window.location="http://www.crystalevansphotography.com/farley"'; echo '</script>'; } else if($_POST['password'] == "merz" or "Merz"){ echo '<script language="Javascript">'; echo 'window.location="http://www.crystalevansphotography.com/merz"'; echo '</script>'; } else{ echo '<script language="Javascript">'; echo 'window.location="http://www.crystalevansphotography.com/error.html"'; echo '</script>'; } ?> </body> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form id="password" method="post" action="test.php"> pass<br /> <input type="password" name="password" size="50"> <p align="left"><input type="submit" name="Submit" value="Submit"></p> </form> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.