bonjour,
Code : 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 <?PHP include("variables.inc.php"); //include("identification.inc.php"); $liendb = mysql_connect("$host", "$login", "$password"); mysql_select_db($db); ?> <? if ($_REQUEST['action']=="maj") { if (is_uploaded_file($_FILES['image']['tmp_name'])) { move_uploaded_file($_FILES['image']['tmp_name'], 'video_images/' . $_FILES['image']['name']); echo "<img src=video_images/".$_FILES['image']['name'].">"; $image = 'video_images/'.$_FILES['image']['name']; } // else // { //die ("Problème d'envoi de fichier"); // } if (empty($_REQUEST['movie']) || empty($_REQUEST['song']) || empty($_REQUEST['url'])) die("ERREUR : tous les champs doivent être remplis."); $sql = "UPDATE tamilxtreme SET movie = '".$_REQUEST['movie']."',". "song = '".$_REQUEST['song']."',". "image = '".$_REQUEST['image']."',". "url = '".$_REQUEST['url']."',". " WHERE id = '".$_REQUEST['id']."'"; mysql_query ($sql); } elseif ($_REQUEST['action']=="suppr" && $_REQUEST['id']>=1) { $sql = "DELETE FROM tamilxtreme WHERE id='".$_REQUEST['id']."'"; mysql_query ($sql); header("Location: http://tamilmp6.free.fr"); } include("header.inc.php"); echo "<p align='left'> :: FICHE SONG :: [".$_REQUEST['id']."]</p>"; $sql = "SELECT * FROM tamilxtreme WHERE id = '".$_REQUEST['id']."'"; $resultat = mysql_query ($sql); $livesongs = mysql_fetch_array ($resultat); ?> <form action="song_edit.php" method="post"> <input type="hidden" name="enregistre" value="oui" /> <input type="hidden" name="id" value="<?PHP echo $_REQUEST['id']; ?>" /> <table> <tr> <td>Movie : </td> <td><input type="text" name="movie" value="<?PHP echo $livesongs['movie']; ?>" /></td> </tr> <tr> <td>Song : </td> <td><input type="text" name="song" value="<?PHP echo $livesongs['song']; ?>" /></td> </tr> <tr> <td>Image : </td><td><input type="file" name="image" value="<?PHP echo $livesongs['image']; ?>" /></td><td><img src="<?PHP echo $livesongs['image']; ?>" /></td><br /> </tr> <tr> <td>Song Url : </td> <td><input type="text" name="url" value="<?PHP echo $livesongs['url']; ?>" /></td> </tr> </table> <select name="action"> <option value="maj">ENREGISTRER SONG</option> <option value="suppr">EFFACER SONG</option> </select> <input type="submit" value="effectuer" /> </form> <?PHP mysql_close($liendb); include("footer.inc.php"); ?>
j'ai un problème, je n'arrive pas à enregistrer avec UPDATE tamilxtreme SET
je ne vois pas pourquoi, ça ne veut pas marcher
quelqu'un pourait m'aider ?
SVP, merci
KIRUBAN
Partager