par
Cilum90 » 24 févr. 2021, 13:43
Bonjour, je n'arrive pas comprendre l'erreur.
Des idées?
Merci
Parse error: syntax error, unexpected '!' in C:\MAMP\htdocs\Il_mio_sito\page_inscription.php on line 15
<?php
//ON se connecte à la base de donneés
try
{
$bdd = new PDO('mysql:host=localhost;dbname=andrea;charset=utf8', 'root', 'root');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
//ON se connecte à la base de donneés
if(isset($_POST['form_inscription']))
{
if(!empty($_POST['pseudo']) AND !empty($_POST['mdp']) AND !empty($_POST['mdp2']) !empty($_POST['email']))
{
echo "ok";
}
else
{
echo"non";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Site Andrea</title>
<link href="" rel="stylesheet" />
</head>
<body>
<div align="center">
<h1 >Iscrizione al sito</h1>
<br /><br /><br />
<form method="post" action="" enctype="multipart/form-data">
<table>
<tr>
<td align="right">
<label for="pseudo">Pseudo:</label>
</td>
<td align="right">
<input type="text" placeholder="Votre Pseudo" id="Pseudo" />
</td>
</tr>
<tr>
<td align="right">
<label for="mdp">Password:</label>
</td>
<td align="right">
<input type="password" placeholder="Password" id="mdp" />
</td>
</tr>
<tr>
<td align="right">
<label for="mdp2">Repetez Password:</label>
</td>
<td align="right">
<input type="password" placeholder="Password" id="mdp2" />
</td>
</tr> <tr>
<td align="right">
<label for="email">Email:</label>
</td>
<td align="right">
<input type="email" placeholder="Email" id="email" />
</td>
</tr>
</table>
<input type="submit" name="form_inscription" value="Je m'inscris"/>
<p><input class="i6" type="button" onclick="window.location.href = 'page_connexion.php';" value="LOGIN"/></p>
</form>
</div>
</body>
</html>
Bonjour, je n'arrive pas comprendre l'erreur.
Des idées?
Merci
[color=#FF0000]
Parse error: syntax error, unexpected '!' in C:\MAMP\htdocs\Il_mio_sito\page_inscription.php on line 15
[/color]
[PHP]<?php
//ON se connecte à la base de donneés
try
{
$bdd = new PDO('mysql:host=localhost;dbname=andrea;charset=utf8', 'root', 'root');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
//ON se connecte à la base de donneés
if(isset($_POST['form_inscription']))
{
if(!empty($_POST['pseudo']) AND !empty($_POST['mdp']) AND !empty($_POST['mdp2']) !empty($_POST['email']))
{
echo "ok";
}
else
{
echo"non";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Site Andrea</title>
<link href="" rel="stylesheet" />
</head>
<body>
<div align="center">
<h1 >Iscrizione al sito</h1>
<br /><br /><br />
<form method="post" action="" enctype="multipart/form-data">
<table>
<tr>
<td align="right">
<label for="pseudo">Pseudo:</label>
</td>
<td align="right">
<input type="text" placeholder="Votre Pseudo" id="Pseudo" />
</td>
</tr>
<tr>
<td align="right">
<label for="mdp">Password:</label>
</td>
<td align="right">
<input type="password" placeholder="Password" id="mdp" />
</td>
</tr>
<tr>
<td align="right">
<label for="mdp2">Repetez Password:</label>
</td>
<td align="right">
<input type="password" placeholder="Password" id="mdp2" />
</td>
</tr> <tr>
<td align="right">
<label for="email">Email:</label>
</td>
<td align="right">
<input type="email" placeholder="Email" id="email" />
</td>
</tr>
</table>
<input type="submit" name="form_inscription" value="Je m'inscris"/>
<p><input class="i6" type="button" onclick="window.location.href = 'page_connexion.php';" value="LOGIN"/></p>
</form>
</div>
</body>
</html>
[/PHP]