J'ai un probleme en code php aidez moi svp
bobch
Messages postés
14
Statut
Membre
-
bobch Messages postés 14 Statut Membre -
bobch Messages postés 14 Statut Membre -
Bonjour,
j'ai crée un code pour modifier admin à la page création en Dreamweaver il s'affiche normal mais sous web local il s'affiche ce msg :
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\EasyPHP-5.3.2i\www\sve\modif_admin.php on line 29
voilà le code :
<!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>Document sans titre</title>
<style type="text/css">
<!--
body {
background-image: url(WWWnew.jpg);
background-repeat: no-repeat;
}
-->
</style></head>
<body>
<?php
include('connex_base.php');
if (isset ($_POST["modif"]))
{
$id=$_POST['id'];
$email=$_POST['email'];
$nom=$_POST['nom'];
$prenom=$_POST['prenom'];
$login=$_POST['login'];
$pwd=$_POST['pwd'];
$sql2="UPDATE sve_admin set
nom='$_POST['nom']',
prenom='$_POST['prenom']',
email='$_POST['email']',
login='$_POST['login']',
pwd=$'$_POST['pwd']'
WHERE id='$_POST['id']'";
mysql_query($sql2);
?>
<div align="center">
<br>Merci, le client <b><?php echo($_POST['nom']." ".$_POST['prenom']);?></b>
<br>est bien été modifié
</div>
<br />
<br />
<center>
<p> </p>
<h2> </h2>
<h2>Modifier Admin</h2>
</tt>
</center>
<center>
<form action="modif_admin.php" method="post">
<table width="74%" cellpadding="5" cellspacing="0" class="mod-form" style="margin: 10px 0; border: 0;">
<tr>
<td width="20%">Email</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="email" name="email"></td>
</tr>
<tr>
<td width="20%">Nom</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="nom" name="nom" /></td>
</tr>
<tr>
<td width="20%">Prenom</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="prenom" name="prenom"></td>
</tr>
<tr>
<td width="20%">Login</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="login" name="login" /></td>
</tr>
<tr>
<td width="20%">Password</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="pwd" name="pwd"></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $tableau['id_admin'] ; ?>">
<input type="submit" name="modif" class="mod-form-button" value="Valider">
<input name="reset" type='reset' value='Annuler' />
</p>
</form>
</center>
<?php
}
?>
</body>
</html>
j'ai crée un code pour modifier admin à la page création en Dreamweaver il s'affiche normal mais sous web local il s'affiche ce msg :
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\EasyPHP-5.3.2i\www\sve\modif_admin.php on line 29
voilà le code :
<!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>Document sans titre</title>
<style type="text/css">
<!--
body {
background-image: url(WWWnew.jpg);
background-repeat: no-repeat;
}
-->
</style></head>
<body>
<?php
include('connex_base.php');
if (isset ($_POST["modif"]))
{
$id=$_POST['id'];
$email=$_POST['email'];
$nom=$_POST['nom'];
$prenom=$_POST['prenom'];
$login=$_POST['login'];
$pwd=$_POST['pwd'];
$sql2="UPDATE sve_admin set
nom='$_POST['nom']',
prenom='$_POST['prenom']',
email='$_POST['email']',
login='$_POST['login']',
pwd=$'$_POST['pwd']'
WHERE id='$_POST['id']'";
mysql_query($sql2);
?>
<div align="center">
<br>Merci, le client <b><?php echo($_POST['nom']." ".$_POST['prenom']);?></b>
<br>est bien été modifié
</div>
<br />
<br />
<center>
<p> </p>
<h2> </h2>
<h2>Modifier Admin</h2>
</tt>
</center>
<center>
<form action="modif_admin.php" method="post">
<table width="74%" cellpadding="5" cellspacing="0" class="mod-form" style="margin: 10px 0; border: 0;">
<tr>
<td width="20%">Email</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="email" name="email"></td>
</tr>
<tr>
<td width="20%">Nom</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="nom" name="nom" /></td>
</tr>
<tr>
<td width="20%">Prenom</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="prenom" name="prenom"></td>
</tr>
<tr>
<td width="20%">Login</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="login" name="login" /></td>
</tr>
<tr>
<td width="20%">Password</td>
<td width="80%"><input class="mod-input" style="width:100%;" maxlength="255" id="pwd" name="pwd"></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo $tableau['id_admin'] ; ?>">
<input type="submit" name="modif" class="mod-form-button" value="Valider">
<input name="reset" type='reset' value='Annuler' />
</p>
</form>
</center>
<?php
}
?>
</body>
</html>
A voir également:
- J'ai un probleme en code php aidez moi svp
- Code ascii - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code puk bloqué - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages
8 réponses
$sql2 = "UPDATE sve_admin set nom='{$_POST['nom']}', prenom='{$_POST['prenom']}', email='{$_POST['email']}', login='{$_POST['login']}', pwd='{$_POST['pwd']}' WHERE id={$_POST['id']}";
Google is your best friend
VB.NET is good ... VB6 is better !
background-image: url('WWWnew.jpg'); --> les guillemets
Google is your best friend
VB.NET is good ... VB6 is better !
Google is your best friend
VB.NET is good ... VB6 is better !
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question