j'ai un problem a l'execution de cet page car le navigateur m'indique une erreur a la derniere ligne oumeme si dans cette ligne j'ai rien ecrit????? j'ai installé le easyphp et mabase existe!! s'il vous plait aider votre nouveau ami
voila ma page:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!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>Untitled Document</title>
</head>
 
<body>
<?php
 
$dbservertype='mysql';
$servername='localhost';
// username and password to log onto db server
$dbusername='root';
$dbpassword='';
// name of database
$dbname='mabase';
 
////////////////////////////////////////
////// DONOT EDIT BELOW  /////////
///////////////////////////////////////
connecttodb($servername,$dbname,$dbusername);
function connecttodb($servername,$dbname,$dbuser)
{
global $link;
$link=mysql_connect ("$servername","$dbuser");
if(!$link){die("Could not connect to MySQL");}
mysql_select_db("$dbname",$link) or die ("could not open db".mysql_error());
$userid=mysql_real_escape_string($_POST['userid']);
$password=mysql_real_escape_string($_POST['password']);
$sql="SELECT * FROM plus_signup WHERE userid='$userid' AND password = '$password'";
$rec=mysql_fetch_array(mysql_query($sql));
	if(($rec['userid']==$userid)&&($rec['password']==$password)){
// Register $myusername, $mypassword and redirect to file success file
// Yes
 session_start();
$_SESSION['userid']=$userid; 
header("index.php");}
else {
// No
session_unset();
header("index.php");}
?>
</body>
</html>