hi my login is working on my computer, but when i tried 2 computers from 2 different locations, they couldnt login. any help greatly appreciated. thanks. derek.
its setting the hack variable to Y on remote computers.
here is the code for the login page.
Code: <?php
include("connect1.php");
session_start();
$u = $_POST['username'];
$p = $_POST['password'];
$logoff = $_GET['logoff'];
$hack = $_GET['hack'];
if($logoff){
unset($_SESSION['userid']);
$message = "You have been logged off";
}
if($hack){
$message = "Naughty Naughty! "; // COOL
}
// escape username and password for use in SQL//person said on board "looks fine" like this
//to prevent sql injections
$u = mysql_real_escape_string($u);
$p = mysql_real_escape_string($p);
// if fields username and password have contents, then...
if(isset($u) && isset($p) && !empty($u) && !empty($p)){ ///changed from if ($u && $p)
$query = mysql_query("SELECT * FROM table2 WHERE username = '$u' AND password = '$p'");
$result = mysql_fetch_array($query);
if($result['username']){ // if username is set, go on...username is a key for $result, and a field in the table.
$message = "You have been logged in";
$_SESSION['userid'] = $result['username'];
header("Location:old.mainsite.php"); // this will redirect them to the application.php page. and exit the script here.
exit;
}else{
$message = "You do not exist on the system";
}
}
?>
<?php
//IP BANNING CODE START HERE
$s=$_SERVER["REMOTE_ADDR"];
//draws IP address of visitor
$ipbancheck="SELECT * from banip where IP='$s'";
$ipbancheck2=mysql_query($ipbancheck);
while($ipbancheck3=mysql_fetch_array($ipbancheck2))
{
$IPBANNED=$ipbancheck3[IP];
}
//above lines check to see if user Ip is in banned IPs
if ($IPBANNED)
{
header('Location: http://derekvanderven.com/hacker.html');
//print "You have been banned ";
}
else
{
}
?>
here is the code for the form
Code: <form id="form1" name="form1" method="post" action="">
<p> </p>
<table width="200" border="1" align="center">
<tr>
<td><span class="style2">Login to the secret pages</span></td>
</tr>
<tr>
<td><label for="username"> User name </label>
<input type="text" name="username" id="username" /></td>
</tr>
<tr>
<td><label for="password"> Password </label>
<input type="password" name="password" id="password" /></td>
</tr>
<tr>
<td height="44"><input type="submit" name="submit" id="submit" value="Submit" /></td>
</tr>
</table>
</form>
multipart emiail forms
Hi All, I am new to the boards and I've been working on a form (which is rather massive, imo) and i've been looking online at other peoples php examples for multipart emails. The code i am using /
Help with translating C code into assembler code
Hi im doing a project that moves a robot around a maze avoiding walls and need some help with converting C code into assembly code.#include <stdio.h>int left_feeler;int right_feelerint
Auto-populating dropdowns and multiple forms.
Here's what I have so far:First drop down = select a state (works)This populates the second drop down (works)Second drop down = select a city (works)This populates the third drop down with local
Having a problem get the selected item from a drop down menu
I have been looking at this for days now.I have a drop down menu that get it's values from an sql database That works but now I want to get the item and pass it to another query that's where I get
RSS feed - FeedList for WordPress
Hi,I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of an item and have it open in a new window to display the full item. I don't want it to go to the host
Inserting a check in checkbox from array value
Hello all,I have a bit of code that works for a select option box, but does not work for my checkboxes. I need multiple selections on this code and I really don't like the look of multiple select
New to PHP and just trying to understand a little code.
I hope I'm not annoying anyone or breaking the rules but I was wondering about this bit of code right here: " <?php$people = Array(Array('name' => 'Kalle', 'salt' =>
b+ tree
Hi can every body help me about b+ tree ?(insert & delete)
include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some questions with it.So there is the index.php on the server of the person who bought it
Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with how it was written before I continue on.Code: <?php require