\r
# voir : http://us2.php.net/manual/en/function.func-num-args.php\r
\r
-function query($query, $a, $b, $c, $d, $e)\r
+# utiliser mysqli à la place :\r
+# $stmt = $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)");\r
+# $stmt->bind_param('sssd', $code, $language, $official, $percent);\r
+function query($query)\r
{\r
- if ($a == null)\r
- return mysql_query($query);\r
- if ($b == null)\r
- return mysql_query(sprintf($query,\r
- is_string($a) ? mysql_real_escape_string($a) : $a\r
- ));\r
+ $args = func_get_args();\r
+ foreach ($args as $i => $arg)\r
+ if (is_string($arg))\r
+ $args[$i] = mysql_real_escape_string($a);\r
+ \r
+ array_shift($query, $args);\r
+ \r
+ return mysql_query(call_user_func_array('sprintf', $args));\r
}\r
\r
?>
\ No newline at end of file
</tr>
<tr>
<td>
- email <span class="miniInfo">(non-public)</span>
+ email <span class="miniInfo">(non-public, sauf si piratage de la base ^-^´)</span>
</td>
<td>
<input type="text" maxlength="30" name="e_mail" value="<?=$participant->valide ? $participant->info->e_mail : $_POST['e_mail']?>" />