logowanie.php
Kod
<?php
require_once("ustawienia.php");
require_once("home1.php");
if (!$_POST['user'] || !$_POST['pass']) {
print "<center><b>Wypelnij wszystkie pola.</center></b>";
include("home2.php");
exit;
}
$logres = mysql_num_rows(mysql_query("select user, logins, pass from gracze where user='".$_POST['user']."' and pass=MD5('".$_POST['pass']."')"));
if ($logres <= 0) {
print "Blad przy logowaniu.";
include("home2.php");
exit;
} else {
$_SESSION['user'] = $_POST['user'];
$_SESSION['pass'] = $_POST['pass'];
mysql_query("update gracze set logins=logins+1 where user='".$_POST['user']."'");
print "<center><b>Zostales zalogowany.<a href=index2.php>Dalej</a></center></b>.";
include("home2.php");
}
require_once("home2.php");
?>
require_once("ustawienia.php");
require_once("home1.php");
if (!$_POST['user'] || !$_POST['pass']) {
print "<center><b>Wypelnij wszystkie pola.</center></b>";
include("home2.php");
exit;
}
$logres = mysql_num_rows(mysql_query("select user, logins, pass from gracze where user='".$_POST['user']."' and pass=MD5('".$_POST['pass']."')"));
if ($logres <= 0) {
print "Blad przy logowaniu.";
include("home2.php");
exit;
} else {
$_SESSION['user'] = $_POST['user'];
$_SESSION['pass'] = $_POST['pass'];
mysql_query("update gracze set logins=logins+1 where user='".$_POST['user']."'");
print "<center><b>Zostales zalogowany.<a href=index2.php>Dalej</a></center></b>.";
include("home2.php");
}
require_once("home2.php");
?>
logowanie.html
Kod
<? include("home1.php"); ?>
<table cellpadding=0 cellspacing=0 width=245>
<form method=post action=logowanie.php>
<tr><td width=80 width=10><b>Login:</b></td><td width=145><input type=text name=user style="background-color:#FFCC66 "></td></tr>
<tr><td with=10 ><b>Hasło: </b></td><td> <input type=password name=pass style="background-color:#FFCC66 "></td>
<tr><td colspan=2 align=center><input type=submit value=Zaloguj style="background-color:#CC9900 "></td></tr>
</form></td></tr><tr><td colspan=2 align=center>
<a href=haslo.php>Zapomniałem hasła</a>
</table>
<? include("home2.php"); ?>
<table cellpadding=0 cellspacing=0 width=245>
<form method=post action=logowanie.php>
<tr><td width=80 width=10><b>Login:</b></td><td width=145><input type=text name=user style="background-color:#FFCC66 "></td></tr>
<tr><td with=10 ><b>Hasło: </b></td><td> <input type=password name=pass style="background-color:#FFCC66 "></td>
<tr><td colspan=2 align=center><input type=submit value=Zaloguj style="background-color:#CC9900 "></td></tr>
</form></td></tr><tr><td colspan=2 align=center>
<a href=haslo.php>Zapomniałem hasła</a>
</table>
<? include("home2.php"); ?>
I teraz pytam się czemu na jednym servie działa a na drugim nie>?


ustawienia.php
Kod
<?php
session_start();
mysql_connect("localhost","xxxxxx","xxxxxxx");
mysql_select_db("sql_jankes6_civil");
?>
session_start();
mysql_connect("localhost","xxxxxx","xxxxxxx");
mysql_select_db("sql_jankes6_civil");
?>