Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

login problem!!

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
In my local server I use PHP Version 4.2.1, register_globals is set to on,
when I try to run the following code:

index.html:

<form action=&quot;login.php&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;username>
<input type=&quot;password&quot; name=&quot;password&quot;>
<input type=&quot;submit&quot; value=&quot;Login&quot;>
</form>

php code:

<?
session_start();

// connection goes here,

$query = mysql_query(&quot;SELECT COUNT(*) AS counter FROM admin WHERE username='$username' AND password='$password'&quot;) or die(mysql_error());
$row = mysql_fetch_array($query);

if ($row[&quot;counter&quot;] == 1) {
$login = $username;
session_register('login');
include(&quot;navigation.php&quot;);
exit;
} else {
include &quot;index.php&quot;;
}

?>


it runs well when I use it in my Linux box , but when I connect to this sever using windows from other machine in the LAN it was run good, for some reasons now just refresh the page when the submit button is clicked. all the other php codes run without problems.

Thanks in advance for any help..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top