Na początku mam:
include ('sql.php'); include('funkcje.php');
A tutaj już odnośnie samego logowania:
function start($id) { if($id==1 or $id==2 or $id==3) { switch($lang) { case 'pl': break; } } } } if($id==0) include('startowa.php'); if($id>=1 && $id<=500 && ($id != 22) && ($id != 23) && ($id != 24)) include('bank_zdjec.php'); if($id==22 or $id==23 or $id==24) include('projekty.php'); } $query=mysql_query("select * from uzytkownicy where login='".mysql_real_escape_string($_POST['login'])."' and haslo='".mysql_real_escape_string($_POST['haslo'])."'"); $_SESSION['systemlogin']=$wynik['login']; $_SESSION['systemhaslo']=$wynik['haslo']; start($id); } } start($id); } else { echo ' <form method="post" action="index.php"> <table> <tr> <td>login</td> <td><input type="text" name="login" /></td> </tr> <tr> <td>hasło</td> <td><input type="password" name="haslo" /></td> </tr> <tr> <td></td> <td><input type="submit" value="zaloguj się" /></td> </tr> </table> </form>'; }