Foutmelding bij inloggen
bob
05/04/2007 13:32:00ik krijg dezefoutmelding:
en dit is de script:
en nog 1:
en
zou iemand dit kunnen verbeteren?
Mvg Bob
Code (php)
1
2
3
4
5
2
3
4
5
Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/mafiacrime.freehostia.com/ingelogd.php on line 31
Warning: mysql_query(): A link to the server could not be established in /home/www/mafiacrime.freehostia.com/ingelogd.php on line 31
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/www/mafiacrime.freehostia.com/ingelogd.php on line 32
Warning: mysql_query(): A link to the server could not be established in /home/www/mafiacrime.freehostia.com/ingelogd.php on line 31
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/www/mafiacrime.freehostia.com/ingelogd.php on line 32
en dit is de script:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
$controle=1;
if(isset($_SESSION['ingelogd'])&&$_SESSION['ingelogd']==true){
$id=$_SESSION['id'];
$actief = mysql_query("SELECT actief FROM $tabel_naam WHERE id='$id'");
$actief = mysql_result($actief, 0);
if($actief==0){
$controle=0;
if(isset($_SESSION['ingelogd'])&&$_SESSION['ingelogd']==true){
$id=$_SESSION['id'];
$actief = mysql_query("SELECT actief FROM $tabel_naam WHERE id='$id'");
$actief = mysql_result($actief, 0);
if($actief==0){
$controle=0;
en nog 1:
Code (php)
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
$ingelogd_resultaat = mysql_query("SELECT ingelogd FROM $gebruikers WHERE id='$id'");
$ingelogd = mysql_result($ingelogd_resultaat, 0);
if($ingelogd==1){
$ip_db_resultaat = mysql_query("SELECT ip FROM $grbruikers WHERE id='$id'");
$ip_db = mysql_result($ip_db_resultaat, 0);
if($ip_db != $_SERVER['REMOTE_ADDR']){
$controle=0;
$ingelogd = mysql_result($ingelogd_resultaat, 0);
if($ingelogd==1){
$ip_db_resultaat = mysql_query("SELECT ip FROM $grbruikers WHERE id='$id'");
$ip_db = mysql_result($ip_db_resultaat, 0);
if($ip_db != $_SERVER['REMOTE_ADDR']){
$controle=0;
en
Code (php)
1
2
3
4
2
3
4
$_SESSION['ingelogd'] = $ingelogd;
$_SESSION['id'] = $id;
$_SESSION['ip']= $_SERVER['REMOTE_ADDR'];
header("location: $locatie");
$_SESSION['id'] = $id;
$_SESSION['ip']= $_SERVER['REMOTE_ADDR'];
header("location: $locatie");
zou iemand dit kunnen verbeteren?
Mvg Bob