Bonjour
voici mon code qui ne met à jour ma table, et pourtant, elle semble bien exécuter sans message d'erreur.
Merci de votre assistance
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 require_once('Connections/connexiongedefor.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_connexiongedefor, $connexiongedefor); $query_Recordset1 = "SELECT * FROM region ORDER BY Num_Region ASC"; $Recordset1 = mysql_query($query_Recordset1, $connexiongedefor) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> <form method="post" name="form1"> <table align="center"> <tr valign="baseline"> <td nowrap align="right">Num_Cercle:</td> <td><input type="text" name="Num_Cercle" value="" size="32"></td> </tr> <tr valign="baseline"> <td nowrap align="right">Num_Region:</td> <td><select name="Lregion" id="Lregion"> <option value="value" <?php if (!(strcmp("value", strtoupper($row_Recordset1['Nom_Region'])))) {echo "selected=\"selected\"";} ?>>NOM REGION</option> <?php do { ?> <option value="<?php echo $row_Recordset1['Nom_Region']?>"<?php if (!(strcmp($row_Recordset1['Nom_Region'], strtoupper($row_Recordset1['Nom_Region'])))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['Nom_Region']?></option> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); $rows = mysql_num_rows($Recordset1); if($rows > 0) { mysql_data_seek($Recordset1, 0); $row_Recordset1 = mysql_fetch_assoc($Recordset1); } ?> </select></td> </tr> <tr valign="baseline"> <td nowrap align="right">Nom_Cercle:</td> <td><input type="text" name="Nom_Cercle" value="" size="32"></td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td><input type="submit" value="Insérer un enregistrement"></td> </tr> </table> </form> <p> </p> <?php mysql_free_result($Recordset1); ?>
Partager