J'ai un probleme en code php aidez moi svp

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>

8 réponses

  1. Contributeur
    $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 !
    1. l'affichage ne se fait pas encore quand j'ouvre web local il n y a rien que l'image !!
      1. Contributeur
        background-image: url('WWWnew.jpg'); --> les guillemets
        Google is your best friend
        VB.NET is good ... VB6 is better !
        1. Contributeur
          T'as pas modifé comme j'ai dit dans mon premier post ...
          1. nn j'ai fait tte la modification que tu as dit mais rien :((
            1. Contributeur
              Faudra qu'on m'explique pourquoi ça marche chez moi ...
              1. je ne sais pas mais vraiment ça ne marche pas que dans la partie création sous Dreamweaver mais sous Easyphp local web il n y a que l'image !!!!
            2. faut activé le dpo pour se gore de code
              1. Contributeur
                Tu peux développer un peu ?
              2. a qui tu dit sa
              3. écouter j suis débutante en php et ce code est une partie de mon app du stage alors j ne sais pas qu'est ce qu'un dpo??
              4. bien si tu utilise un serveur ou en local faut le dpo pour les gore de code php
              5. ok tu peux mieux m'expliquer !!