salut bonjour à tous
je suis en train d'essayer de charger les valeurs d'une requête dans champ de texte,apartir d'une valeur id,mais j'arrive pas a les afficher
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 <?php // je recois id que j'envoie en URL if(isset($_GET['id'])) $id=$_GET['id']; //echo ($id);die; $c=mysql_pconnect("localhost", "", ""); if (!$c) die( 'Error'. mysql_error() ); mysql_select_db("soft",$c) or die(mysql_error()); $result = mysql_query("select * from products where id ='$id'",$c); while($book=mysql_fetch_array($result)) { ?> <tr> <td>ISBN:</td> <td><input type=text name=isbn value="<?php echo $isbn ?>" /></td></input> </tr> <tr> <td>Título Libro:</td> <td><input type="text" name=title value="<?php=$book['title'] ?>"/></td></input> </tr> <tr> <td>Precio:</td> <td><input type=text name=price value="<?=$book['price'] ?>"/></td></input> </tr> <tr> <td>Descripción:</td> <td><textarea rows=3 cols=50 name=description> <?=$book["description"]: ?> </textarea></td> </tr> <?php } ?>
merci d'avance
Partager