Parse error: stx error, unexpected $end in 39

Résolu
Lcf.vs Messages postés 144 Date d'inscription   Statut Membre Dernière intervention   -  
Lcf.vs Messages postés 144 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

bonjour, je tente de combiner le TP1 et TP2 du site du zéro sur le php, voici le résultat pour le moment, pouvez-vous me dire où se trouve le problème, svp? voire même s'il y en a d'autres...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Bienvenue</title>
</head>
<style type="text/css">
form
{
text-align:center;
}
</style>
<body>
<?php
if ($_POST['RegistClient'] != NULL AND $_POST['KPClient'] != NULL)
{
if ($RegistClient == $_POST['RegistClient'] AND $KPClient == $_POST['KPClient'])
{
mysql_connect("localhost", "root", "");
mysql_select_db("mabd");
$RegistClient = mysql_real_escape_string(htmlspecialchars($_POST['RegistClient']));
$KPClient = mysql_real_escape_string(htmlspecialchars($_POST['KPClient']));
mysql_close();
?>
<form action="Login" method="post">
<p>
Pseudo : <input type="text" name="RegistClient" /><br />
Mot de passe : <input type="text" name="KPClient" /><br />
<input type="submit" value="Envoyer" />
</p>
</form>
<!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"> xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GoTox.php</title>
<?php
header("Location: https://www.google.be/?gws_rd=ssl");
?>
</head>
<body>
</body>
</html>
<?php
}
}
?>
</body>
</html>


j'ai pour message d'erreur:

Parse error: syntax error, unexpected $end in /home/emarketstudy2/www/index.php on line 39



d'avance, je vous en remercie


Lcf.vs

3 réponses

jchello Messages postés 262 Date d'inscription   Statut Membre Dernière intervention   62
 
Bonjour,

Ce serait plus facile si tu nous disais quelle est la ligne 39 et si tu mettais ton code entre les balises "<"code">" "</"code">" parce que là il y a des retours à la ligne en plus.
0
Lcf.vs Messages postés 144 Date d'inscription   Statut Membre Dernière intervention   36
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Bienvenue</title>
</head>
<style type="text/css">
form
{
text-align:center;
}
</style>
<body>
<?php
if ($_POST['RegistClient'] != NULL AND $_POST['KPClient'] != NULL)
{
if ($RegistClient == $_POST['RegistClient'] AND $KPClient == $_POST['KPClient'])
{
mysql_connect("localhost", "root", "");
mysql_select_db("mabd");
$RegistClient = mysql_real_escape_string(htmlspecialchars($_POST['RegistClient']));
$KPClient = mysql_real_escape_string(htmlspecialchars($_POST['KPClient']));
mysql_close();
?>
<form action="Login" method="post">
<p>
Pseudo : <input type="text" name="RegistClient" /><br />
Mot de passe : <input type="text" name="KPClient" /><br />
<input type="submit" value="Envoyer" />
</p>
</form>
<!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"> xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GoTox.php</title>
<?php
header("Location: https://www.google.be/?gws_rd=ssl");
?> <=== la ligne qui plante!!!
</head>
<body>
</body>
</html>
<?php
}
}
?>
</body>
</html>



pour ce qui est de tes balises code, explique ce que tu veux dire, stp...
0
Lcf.vs Messages postés 144 Date d'inscription   Statut Membre Dernière intervention   36
 
bon, voilà, cette partie là du problème est réglé, tout venait d'une faute dans le Doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Bienvenue</title>
</head>
<style type="text/css">
form
{
text-align:center;
}
</style>
<body>
<?php
if ($_POST['RegistClient'] != NULL AND $_POST['KPClient'] != NULL)
{
if ($RegistClient == $_POST['RegistClient'] AND $KPClient == $_POST['KPClient'])
{
mysql_connect("sql5.power-heberg.net", "emarketstudy2", "dyy6k47z");
mysql_select_db("emarketstudy2");
$RegistClient = mysql_real_escape_string(htmlspecialchars($_POST['RegistClient']));
$KPClient = mysql_real_escape_string(htmlspecialchars($_POST['KPClient']));
mysql_close();
?>
<form action="Login" method="post">
<p>
Pseudo : <input type="text" name="RegistClient" /><br />
Mot de passe : <input type="text" name="KPClient" /><br />
<input type="submit" value="Envoyer" />
</p>
</form>
<!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" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GoTox.php</title>
<?php
header("Location: https://www.google.be/?gws_rd=ssl");
?>
</head>
<body>
</body>
</html>
<?php
}
}
?>
</body>
</html>


merci à ceux qui m'ont aidé...
0