[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Fout in inlog script
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Fout in inlog script

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Fout in inlog script

Berichtdoor Remi » 27 jun 2006 11:36

Hey,

Ik ben er eindelijk achter hoe ik een goede inlog script kan maken, in ieder geval dat dacht ik, wat nu doet hij het niet.
Maar hier is het script:
[code="php"]<?php
$send = $_POST['send'] ;
if($send == 'yes')
{
$username = $_POST['username'] ;
$password = md5($_POST['password']) ;

//connection
include('confdata.php') ;
$result = mysql_query("SELECT username, pass FROM users WHERE username='".$username."'") ;

$aantal = mysql_num_rows($result) ;
$login = mysql_fetch_object($result) ;

if($aantal == '0')
{
echo 'The user is incorrect' ;
}
elseif($password != $login->pass)
{
echo 'the pw is incorrect' ;
}
else
{
echo 'Welcome'.$username ;
}
}
?>[/code]

HTML
[code="html"]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="script.php">
<div align="center">
<p><strong>Login </strong></p>
<table width="200" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>Username</td>
<td><input name="username" type="text" id="username" /></td>
</tr>
<tr>
<td>Password</td>
<td><input name="password" type="password" id="password" /></td>
</tr>
<tr>
<td><input name="send" type="hidden" id="send" value="yes" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Login" type="submit" id="Login" value="Login" />
<input name="Reset" type="reset" id="Reset" value="Reset" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>[/code]
Ik krijg namelijk de hele tijd de melding:
the pw is incorrect
Laatst bijgewerkt door Remi op 01 jan 1970 01:00, in totaal 1 keer bewerkt.
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Weeeyaa » 27 jun 2006 11:44

[code="php"]$password = md5($_POST['passsword']) ;[/code]

is een S te veel bij $_POST['password']

Thijs
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Fout in inlog script

Berichtdoor Remi » 27 jun 2006 12:20

bedankt ik ga ff kijken of het dan wel werkt.
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Weeeyaa » 27 jun 2006 12:26

oke Smile
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Fout in inlog script

Berichtdoor Remi » 27 jun 2006 12:39

Laatst bijgewerkt door Remi op 01 jan 1970 01:00, in totaal 1 keer bewerkt.
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Robin » 27 jun 2006 12:43

Laat hem $password en $login->pass echoën, kijken of ze bestaan. Zo ja, wat voor een output je dan krijgt.
Avatar gebruiker
Robin
wmpr
 
Berichten: 66
Geregistreerd: 29 sep 2005 20:30
Woonplaats: Amsterdam

Re: Fout in inlog script

Berichtdoor Remi » 27 jun 2006 12:50

Oké, ik ben nu tot de concludie gekomen,
$password heeft geen uitkomst die andere klopt wel.
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Remi » 27 jun 2006 15:58

Kom er nog steeds niet maar hier een paar scripts:


Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Weeeyaa » 27 jun 2006 16:25

geloof heb je gans de wereld in dat ding gezet he Razz
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Fout in inlog script

Berichtdoor Remi » 27 jun 2006 19:52

dat was wel de bedoeling Very Happy
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Remi » 28 jun 2006 13:27

Het is al opgelost Very Happy
Avatar gebruiker
Remi
wmpr
 
Berichten: 3010
Geregistreerd: 04 apr 2006 15:22

Re: Fout in inlog script

Berichtdoor Weeeyaa » 28 jun 2006 13:28

dan ben ik wel benieuwd wat het probleem was Smile
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39


Keer terug naar PHP, ASP, SQL



cron