| | |
|
|
|
php question |
| message from wikstov on 21 Jul 2004 |
i'm rather new to this, so please don't shoot me for asking something all too
obvious
what is wrong with this code?
session_start();
$aantal=$_SESSION['aantal'];
echo $aantal;
while ($i<=$aantal){
if (isset($_POST['inschrijvingID[$i]']))$recs[]="inschrijvingID[$i]";
$i++;
}
if (is_array($recs)){
echo "OK";
if (count($recs)>1){
$where=join($recs,",");
$sql="UPDATE mytable SET field=value WHERE field IN ($where)";
}
i'd at least expect it to display "OK", but it doesn't
thanks to all of you who can help me out
|
| Michael Fesser replied to wikstov on 21 Jul 2004 |
.oO(wikstov)
What's the value of $aantal? Does it display anything?
$i is not initialized.
$recs is not initialized.
While the above may not be the reasons for your problem, I _strongly_
recommend to set error_reporting to E_ALL in your php.ini first and fix
the reasons for the notices that will show up then.
Micha
|
|
Archived message: php question (Macromedia Dreamweaver Web Design)