Jump to content

if statement not working:


rofl90

Recommended Posts

heres my login.php

 

<?php
error_reporting(E_ALL);
$dbhost = 'x';
$dbuser = 'x';
$dbpass = 'x;
$dbname = 'x';
mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error());

mysql_select_db($dbname);
$message = $_GET['a'];
if(!empty($message)) {
echo $message;
}
else {
?>
<form action="validate.php" method="post"> <fieldset>
<label>Your IP is <?php echo $_SERVER['REMOTE_ADDR']; ?>, and has been logged, unauthorised attempts to access will be logged, and steps will be taken. <br /></label>
<br />
<fieldset>
<legend>Name</legend>
<input type="text" name="userid" id="user" />
</fieldset>
(not case sensitive eg cHaRLiE becomes 'Charlie') <br />
<br />
<fieldset><legend> Password</legend>
<input type="password" name="password" id="password" />
</fieldset>
(cAsE sEnSiTiVe) <br />
<br />
<input type="submit" id="submit" value="Login" />
<input name="ip" type="hidden" id="hidden" value="<?php $ip = $_SERVER['REMOTE_ADDR']; echo $ip; ?>" />
<br />
<br />
Backend time out currently set at: <?php $result = mysql_query("SELECT * FROM settings") or die(mysql_error()); 
$row = mysql_fetch_array($result);
$timing = $row['timeout']; echo $timing / 60; ?> minutes.<br />
</fieldset></form>
<?php } ?>

it is like

 

login.php?a=Login has failed

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.