I appreciate you trying to help with this. This is what I've started with to get the form layout; and once the username and password are typed in, my page does go to a blank page, however, it doesn't open the url designated in the passwdprotect.php. Obviously I haven't used the right code to make it happen. Any suggestions?
this is what I've added to my auth_mod.tpl:
<div style="padding-top:30px"></div>
<div id="RegisterSection">
<p id="RegisterText">If you are an approved Dealer and have not completed the Online Dealer Store registration process, please enter access code below.</p>
<form action="{$form_url}/include/passwdprotect.php" method="post" name="form">
<p style="padding-top:8px"></p>
<p id="RegisterText"><strong>Username:</strong><b style="padding-right:13px"></b><input type="text" title="Username" name="txtUsername2" /></p>
<p style="padding-top:8px"></p>
<p id="RegisterText"><b style="padding-left:31px"></b><strong>Code:</strong><b style="padding-right:14px"></b><input type="password" title="Password" name="txtPassword2" /></p>
<p style="padding-bottom:12px"></p><br /><br /><br />
<p id="RegisterText"><strong>Register:</strong><b style="padding-right:14px"></b><br /><input type="submit" name="Register" value="Register" /></p>
</form>
</div>
</td>
</TABLE>
</div>
{/capture}
{ include file="menu_mod.tpl" menu_title=<!--$lng.lbl_authentication--> menu_content=$smarty.capture.menu }
this is what I've tried to tweak in the passwdprotect.php file:
<?php
// Define your username and password
$username2 = "someusernamehere";
$password2 = "somepasswordhere";
if ($_POST['txtUsername2'] != $username || $_POST['txtPassword2'] != $password) {
?>
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p id="RegisterText"><label for="txtUsername2">Username:</label>
<br /><input type="text" title="Username" name="txtUsername2" /></p>
<p id="RegisterText"><label for="txtpassword2">Code:</label>
<br /><input type="password" title="Password" name="txtPassword2" /></p>
<p><input type="submit" name="Register" value="Register" /></p>
</form>
("Location: "http://www.webaddress.com/");
<?php
}
else {
?>
<?php
}
?>
Quote:
Originally Posted by Ashley
No I really don't. Was just going to try and help you get the other one working.
|