Sfoglia il codice sorgente

maybe the array thing isn't the right way to go

development
mauirixxx 8 anni fa
parent
commit
b9e03f62ef
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      gw-create.php

+ 2
- 2
gw-create.php Vedi File

@@ -16,10 +16,10 @@ if ($createnew === "1"){
$bdate = mysqli_real_escape_string($con, $_POST['bdate']);
$profid = mysqli_real_escape_string($con, $_POST['professionid']);
function getColor() {
return array("#DDD", "#FF8", "#CF9", "#ACF", "#9FC", "#DAF", "#FBB", "#FCE", "#BFF", "#FC9", "#DDF");
return array("#FFF", "#DDD", "#FF8", "#CF9", "#ACF", "#9FC", "#DAF", "#FBB", "#FCE", "#BFF", "#FC9", "#DDF");
}
$profcolor = getColor()[$profid];
echo 'profession color is ' . $profcolor . '!';
echo 'profession color is ' . $profcolor . ' due to profid being ' . $profid . '!';
list ($y, $m, $d) = explode('-', $bdate);
if (!checkdate($m, $d, $y)) {
echo 'Date is invalid ' . $bdate . '<BR />';


Caricamento…
Annulla
Salva