You don't have PHP setup locally. Put that on your server and see if it works.
You don't have PHP setup locally. Put that on your server and see if it works.
Corrections to my coding/thoughts welcome.
Success! http://kapleenmusic.webfreehosting.n...estyouknow.php
Now, HTAccess time again. I can still access it w/o logging inany solutions?
Do you have control to edit the page you are forwarding the user to?
Corrections to my coding/thoughts welcome.
The CPanel? Yeah.
Okay, you'll need to convert it to a php file. I'll post another code for you in a bit that should do it.
Corrections to my coding/thoughts welcome.
I had to make it manually so I have full access to it :P
Thanks!!
-[Nic]-
Cpanel code:
Form Page:PHP Code:<?php
//If not sure use the form to get here and copy what is displayed above the fail in quotes (if the welcome is displayed you id it correctly.
echo "Copy the value in these Quotes '" . $_SERVER['HTTP_REFERER'] . "'<br />";
if ($_SERVER['HTTP_REFERER'] == "http://domain.com/directories/name.php" || $_SERVER['HTTP_REFERER'] == "http://www.domain.com/directories/name.php") {
echo "Welcome<br />";
if ($_GET['secured'] == 24) {
echo "Verified";
} else {
echo "Unverified";
}
} else {
echo "Fail";
}
?>
PHP Code:<?php
if (isset($_POST['username']) && isset($_POST['password'])) {
if ($_POST['username']=="a" && $_POST['password']=="a") {
header("Location: http://domain/directories/name.php?secured=24");
}
}
?>
<form name="login" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
<div align="center">
<center>
<table width="225" cellpadding="3" border="1">
<tbody>
<tr>
<td colspan="2"><font size="5"><b>Members-Only Area!</b></font></td>
</tr>
<tr>
<td>Username:</td>
<td><input type="text" name="username" size="20"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="text" name="password" size="20"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="Login!"></td>
</tr>
</tbody>
</table>
</center>
</div>
</form>
Corrections to my coding/thoughts welcome.
Do I add the PHP code with the HTML code on the CPanel?
And the links in both codes, what do I change those to?
Like,
And,Code:Instead of "header("Location: http://domain/directories/name.php?secured=24");" to "header("Location: http://kapleenmusic.webfreehosting.net/login.php?secured=24"); ?
Code:Like, "if ($_SERVER['HTTP_REFERER'] == "http://domain/directories/name.php" || $_SERVER['HTTP_REFERER'] == "http://www.domain.com/directories/name.php") { to if ($_SERVER['HTTP_REFERER'] == "http://kapleenmusic.webfreehosting.net/CPANEL=304935609023q840943903258fg094et9ig0r9e.php" || $_SERVER['HTTP_REFERER'] == "http://kapleenmusic.webfreehosting.net/CPANEL=304935609023q840943903258fg094et9ig0r9e.php") { ?
First quote yes, second quote no, copy the address that appears when you are forwarded there. It's not the page that you are on but the page that gets you there. The second address should have the www. because users/ you can access your site via http://site or http://www.site
The html goes inside where it says echo "Verified";
Delete "echo "Verified"; and put in
Code:?> HTML OF CPANEL GOES HERE.... <?php
Corrections to my coding/thoughts welcome.
They're blank when I visit them.
http://kapleenmusic.webfreehosting.n...estyouknow.php
http://kapleenmusic.webfreehosting.n...4et9ig0r9e.php
Bookmarks