Parse error: syntax error, unexpected T_VARIA
phpuser
Messages postés
64
Statut
Membre
-
phpuser Messages postés 64 Statut Membre -
phpuser Messages postés 64 Statut Membre -
Bonjour,
je suis débutant PHP,j'obtient tjrs l'erreur suivante :
Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\3-Structure\test2.php on line 6
voici le code :
<?php
$connexion=mysql_connect( "localhost" , "root" , "" );
mysql_select_db("parc_info");
$date=getdate();
$datejour=$date[year].'/'.$date[mon].'/'.$date[mday];
$requete3="insert into commande values("$_POST['id_user']","$_POST['designation']","$_POST['utilite']","$datejour","$_POST['bouton']","$_POST['id_user']","$_POST['nom_commande']")";
$resultat3=mysql_query($requete3);
$article3=mysql_fetch_array($resultat3);
?>
<!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=utf-8" />
<title>PAGE UTILISATEUR</title>
</head>
<body>
<h1>PAGE USER</h1>
<form id="monform" name="form1" method="post" action="test2.php">
<p>
<label>id_user :
<input type="text" name="id_user" />
</label>
</p>
<p>
<label>designation :
<input type="text" name="designation" />
</label>
</p>
<p>
<label>nom_commande :
<input type="text" name="nom_commande" />
</label>
</p>
<p>
<label>utilite:
<input type="text" name="utilite" />
</label>
</p>
<p>
<label>date_commande:
<input type="text" name="date_commande" />
</label>
</p>
<p>
<label>
<input type="submit" name="bouton" value="confirmation" />
</label>
</p>
</form>
</body>
</html>
si qlq'un pourait m'aider,je serais trés reconnaissant.
je suis débutant PHP,j'obtient tjrs l'erreur suivante :
Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\3-Structure\test2.php on line 6
voici le code :
<?php
$connexion=mysql_connect( "localhost" , "root" , "" );
mysql_select_db("parc_info");
$date=getdate();
$datejour=$date[year].'/'.$date[mon].'/'.$date[mday];
$requete3="insert into commande values("$_POST['id_user']","$_POST['designation']","$_POST['utilite']","$datejour","$_POST['bouton']","$_POST['id_user']","$_POST['nom_commande']")";
$resultat3=mysql_query($requete3);
$article3=mysql_fetch_array($resultat3);
?>
<!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=utf-8" />
<title>PAGE UTILISATEUR</title>
</head>
<body>
<h1>PAGE USER</h1>
<form id="monform" name="form1" method="post" action="test2.php">
<p>
<label>id_user :
<input type="text" name="id_user" />
</label>
</p>
<p>
<label>designation :
<input type="text" name="designation" />
</label>
</p>
<p>
<label>nom_commande :
<input type="text" name="nom_commande" />
</label>
</p>
<p>
<label>utilite:
<input type="text" name="utilite" />
</label>
</p>
<p>
<label>date_commande:
<input type="text" name="date_commande" />
</label>
</p>
<p>
<label>
<input type="submit" name="bouton" value="confirmation" />
</label>
</p>
</form>
</body>
</html>
si qlq'un pourait m'aider,je serais trés reconnaissant.
A voir également:
- Parse error: syntax error, unexpected T_VARIA
- Fan error lenovo - Forum Refroidissement
- Eespt technical error - Forum Box et Streaming vidéo
- Pour ceux qui ont "LENOVO fan error au démarrage" - Forum PC portable
- Cmos checksum error ✓ - Forum Carte-mère/mémoire
- Network error iptv - Forum TV & Vidéo
2 réponses
Il te manque les points pour concaténer les chaines de caractères :
Bonne continuation.
$requete3="insert into commande values(".$_POST['id_user'].",".$_POST['designation'].",".$_POST['utilite'].",".$datejour.",".$_POST['bouton'].",".$_POST['id_user'].",".$_POST['nom_commande'].")";
Bonne continuation.
phpuser
Messages postés
64
Statut
Membre
merci bcp Joe;maintenant ça marche.