[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
Pagina 1 van 1

Fout in inlog script

BerichtGeplaatst: 27 jun 2006 11:36
door Remi
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

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 11:44
door Weeeyaa
[code="php"]$password = md5($_POST['passsword']) ;[/code]

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

Thijs

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 12:20
door Remi
bedankt ik ga ff kijken of het dan wel werkt.

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 12:26
door Weeeyaa
oke Smile

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 12:39
door Remi

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 12:43
door Robin
Laat hem $password en $login->pass echoën, kijken of ze bestaan. Zo ja, wat voor een output je dan krijgt.

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 12:50
door Remi
Oké, ik ben nu tot de concludie gekomen,
$password heeft geen uitkomst die andere klopt wel.

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 15:58
door Remi
Kom er nog steeds niet maar hier een paar scripts:



Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 16:25
door Weeeyaa
geloof heb je gans de wereld in dat ding gezet he Razz

Re: Fout in inlog script

BerichtGeplaatst: 27 jun 2006 19:52
door Remi
dat was wel de bedoeling Very Happy

Re: Fout in inlog script

BerichtGeplaatst: 28 jun 2006 13:27
door Remi
Het is al opgelost Very Happy

Re: Fout in inlog script

BerichtGeplaatst: 28 jun 2006 13:28
door Weeeyaa
dan ben ik wel benieuwd wat het probleem was Smile