Problème PHp
seb
-
ShayFmw Messages postés 106 Date d'inscription Statut Membre Dernière intervention -
ShayFmw Messages postés 106 Date d'inscription Statut Membre Dernière intervention -
Bonsoir a tous j'ai un petit problème :
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\Service\site.php on line 72
voici mon code :
try
{
$bdd = new PDO('mysql:host=localhost;dbname=service', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
// On ajoute une entrée dans la table
$bdd->exec('INSERT INTO Informatiques(Nom, Prénom, Téléphone, Rue, Ville, Département, E-mail, Service, Date, Tarif, Description) VALUES(\'Nom\', \'Prénom\', \'Téléphone\', Rue\'Ville\'Département\'E-mail\'Service\'Date\'Tarif\'Description\'')');
$req->execute(array(
'Nom' => $Nom,
'Prénom' => $Prénom,
'Téléphone' => $Téléphone,
'Rue' => $Rue,
'Ville' => $Ville,
'Département' => $Département,
'E-mail' => $E-mail,
'Service' => $Service,
'date' => $Date,
'Tarif' => $Tarif,
'Description' => $Description,
));
echo 'Service publié !';
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\Service\site.php on line 72
voici mon code :
try
{
$bdd = new PDO('mysql:host=localhost;dbname=service', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
// On ajoute une entrée dans la table
$bdd->exec('INSERT INTO Informatiques(Nom, Prénom, Téléphone, Rue, Ville, Département, E-mail, Service, Date, Tarif, Description) VALUES(\'Nom\', \'Prénom\', \'Téléphone\', Rue\'Ville\'Département\'E-mail\'Service\'Date\'Tarif\'Description\'')');
$req->execute(array(
'Nom' => $Nom,
'Prénom' => $Prénom,
'Téléphone' => $Téléphone,
'Rue' => $Rue,
'Ville' => $Ville,
'Département' => $Département,
'E-mail' => $E-mail,
'Service' => $Service,
'date' => $Date,
'Tarif' => $Tarif,
'Description' => $Description,
));
echo 'Service publié !';
A voir également:
- Problème PHp
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP