![]() |
|
Aide à la création d'une console d'administration
|
Thread Tools | Display Modes |
|
#16
|
||||
|
||||
|
C'est le resultat d'un requete SQL : while($loc_data = mysql_fetch_array($rc))
Code:
elseif($_POST['send'] == 'update') {
$path1= "d:/www/.com/img/locations/".$HTTP_POST_FILES['lfile']['name'][0];
$path2= "d:/www/.com/img/locations/".$HTTP_POST_FILES['lfile']['name'][1];
$path3= "d:/www/.com/img/locations/".$HTTP_POST_FILES['lfile']['name'][2];
$path4= "d:/www/.com/img/locations/".$HTTP_POST_FILES['lfile']['name'][3];
if ($HTTP_POST_FILES['lfile']['name'][0] == NULL) $HTTP_POST_FILES['lfile']['name'][0] = $loc_data['loc_image_01'];
else copy($HTTP_POST_FILES['lfile']['tmp_name'][0], $path1);
if ($HTTP_POST_FILES['lfile']['name'][1] == NULL) $HTTP_POST_FILES['lfile']['name'][1] = $loc_data['loc_image_02'];
else copy($HTTP_POST_FILES['lfile']['tmp_name'][1], $path2);
if ($HTTP_POST_FILES['lfile']['name'][2] == NULL) $HTTP_POST_FILES['lfile']['name'][2] = $loc_data['loc_image_03'];
else copy($HTTP_POST_FILES['lfile']['tmp_name'][2], $path3);
if ($HTTP_POST_FILES['lfile']['name'][3] == NULL) $HTTP_POST_FILES['lfile']['name'][3] = $loc_data['loc_image_04'];
else copy($HTTP_POST_FILES['lfile']['tmp_name'][3], $path4);
$sql =
' UPDATE locations SET
loc_ref = "' .$_POST['loc_ref'].'"
, loc_type = "' .$_POST['loc_type'].'"
, loc_surface = "' .$_POST['loc_surface'].'"
, loc_loggia = "' .$_POST['loc_loggia'].'"
, loc_loyer = "' .$_POST['loc_loyer'].'"
, loc_charges = "' .$_POST['loc_charges'].' "
, loc_frais = "' .$_POST['loc_frais'].'"
, loc_lieu = "' .$_POST['loc_lieu'].'"
, loc_dispo = "' .$_POST['loc_dispo'].'"
, loc_image_01 = "' .$HTTP_POST_FILES['lfile']['name'][0].'"
, loc_image_02 = "' .$HTTP_POST_FILES['lfile']['name'][1].'"
, loc_image_03 = "' .$HTTP_POST_FILES['lfile']['name'][2].'"
, loc_image_04 = "' .$HTTP_POST_FILES['lfile']['name'][3].'"
, loc_details = "' .$_POST['loc_details'].'"
WHERE loc_id = "' .$_POST['loc_id'].'"';
__________________
L'ignorance n'excuse pas la CONNERIE |
|
#17
|
|||
|
|||
|
Donne voir la suite de ton code, parce que là je saisis pas trop.
EDIT : nous avons discuté par IM, et j'avais raison de me questionner sur son $loc_data, la boucle était complètement ailleurs, genre rien à voir... Donc bon, la solution que je lui ai proposé c'est de modifier sa requête sql pour que les champs soient mis à jour seulement si il y a une valeur, au lieu d'aller chercher l'ancienne pour la remettre dans un update... C'est pas très français mais j'suis à moitié malade hun. Last edited by fonji; 09-08-2006 at 19:31. |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pb création de compte Mail Exchange. | TibolouS | Windows NT4/2000/2003/2008 Serveur | 3 | 20-01-2009 08:42 |
| Cours de français | Benjy | Discussions sur le site et/ou le forum | 47 | 01-05-2006 15:47 |
| console d'administration joomla | roudoudou | Design Web / Graphisme | 6 | 09-01-2006 23:10 |
| Aide pour création de site | virus0r | Design Web / Graphisme | 24 | 31-05-2004 16:35 |
| Creation de compte | Shadow | Windows NT4/2000/XP Client | 1 | 16-02-2003 09:44 |
All times are GMT +2. The time now is 04:10.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.


























Linear Mode


