Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][msql] Problem z serwerem czy skrypt?
Yabola06
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 29.11.2007

Ostrzeżenie: (0%)
-----


Otóż mam skrypt logowania i tak na Activ.pl działa na boo.pl nie choć to te same pliki ta sama baza itp.
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");
?>


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&#322o: </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&#322em has&#322a</a>

</table>
<? include("home2.php"); ?>


I teraz pytam się czemu na jednym servie działa a na drugim nie>?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) ? czy to wina skryptu?
ustawienia.php
Kod
<?php
session_start();
mysql_connect("localhost","xxxxxx","xxxxxxx");
mysql_select_db("sql_jankes6_civil");
?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 19:11