par
stefanelle » 27 févr. 2009, 18:43
ok donc j ai remarqu" que les guillemets disparaisse au niveau de l affichage de mes GET ou dois je mettre le \ devant les guillemets ?
merci
Code : Tout sélectionner
<?php
include ('config.php');
include ('connexion.php');
$id = $_GET["id"];
$sql = "SELECT id, reference, artiste, album, format FROM contenu WHERE id='".$_GET
['id']."'" ;
$req = mysql_query($sql) or die( mysql_error() ) ;
$total = mysql_num_rows($req);
{
echo '<form method ="post" action="lm.php">';
echo '<table>'."\n";
echo '<tr>';
echo '<td ><b><u>id</u></b></td>';
echo '<td ><b><u>reference</u></b></td>';
echo '<td><b><u>artiste</u></b></td>';
echo '<td><b><u>album</u></b></td>';
echo '<td><b><u>format</u></b></td>';
echo '</tr>'."\n";
while($row = mysql_fetch_array($req))
{
echo '<tr>';
echo '<td>'.$id.'</td>';
echo '<td><input type="text" name="reference" value="'.$row
["reference"].'"/></td>';
echo '<td><input type="text" name="artiste" value="'.$row["artiste"].'"/></td>';
echo '<td><input type="text" name="album" value="'.$row["album"].'"/></td>';
echo '<td><input type="text" name="format" value="'.$row["format"].'"/></td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
echo '<input type="hidden" name="id" value="'.$_GET['id'].'" /><input
type="submit" name="btOk" value="Modifier"/>';
echo '</form>';
}
?>
</body></html>
<?php
mysql_close();
?>
ok donc j ai remarqu" que les guillemets disparaisse au niveau de l affichage de mes GET ou dois je mettre le \ devant les guillemets ?
merci
[code]
<?php
include ('config.php');
include ('connexion.php');
$id = $_GET["id"];
$sql = "SELECT id, reference, artiste, album, format FROM contenu WHERE id='".$_GET
['id']."'" ;
$req = mysql_query($sql) or die( mysql_error() ) ;
$total = mysql_num_rows($req);
{
echo '<form method ="post" action="lm.php">';
echo '<table>'."\n";
echo '<tr>';
echo '<td ><b><u>id</u></b></td>';
echo '<td ><b><u>reference</u></b></td>';
echo '<td><b><u>artiste</u></b></td>';
echo '<td><b><u>album</u></b></td>';
echo '<td><b><u>format</u></b></td>';
echo '</tr>'."\n";
while($row = mysql_fetch_array($req))
{
echo '<tr>';
echo '<td>'.$id.'</td>';
echo '<td><input type="text" name="reference" value="'.$row
["reference"].'"/></td>';
echo '<td><input type="text" name="artiste" value="'.$row["artiste"].'"/></td>';
echo '<td><input type="text" name="album" value="'.$row["album"].'"/></td>';
echo '<td><input type="text" name="format" value="'.$row["format"].'"/></td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
echo '<input type="hidden" name="id" value="'.$_GET['id'].'" /><input
type="submit" name="btOk" value="Modifier"/>';
echo '</form>';
}
?>
</body></html>
<?php
mysql_close();
?> [/code]