I have a problem with putting thru some code ...
The first file is classes.php and it puts information via a
form to another form called databaseinput...where the insertion is situated... but it doesn't insert a thing, it doesn't even enter the For -loop(=almost on bottom of text).
I know it's a lot of code...but if anyone wants you help me...i really appreciate it....
here is the code
<form action="databaseinput.php" method="get">
<?php
$conn = mysql_connect("localhost", "u********", "*******");
$query = "SELECT db*******.students.uid,db*******.students.givenName, db*******.students.name FROM db********.students, db*******.klasser WHERE db*******.students.class = db*******.klasser.reeks and db********.klasser.code = '$aj'and db*******.klasser.r1 = '$r1'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
if ($counter%2 == 1)
{
print("<tr class=\"show\">");
}
else
{
print ("<tr class=\"dontshow\">");
}
$counter = $counter + 1;
?>
<td><? print ($row['uid']);?></td>
<td><? print ($row['givenName']);?></td>
<td><? print ($row['name']);?></td>
<td><? print ("<input type=\"checkbox\" name=\"absent[]\" value=\"".$row['uid']."\"/>"); ?></td>
</tr>
<?php
} //while closed mysql_close($conn);
?>
(these are the hidden files of the above code)
<?php
print("<input type=\"hidden\" name=\"userid\" value=\"userid\"/>");
print("<input type=\"hidden\" name=\"givenName\" value=\"givenName\"/>");
print("<input type=\"hidden\" name=\"name\" value=\"name\"/>");
print("<input type=\"hidden\" name=\"month\" value=\"$month\"/>");
print("<input type=\"hidden\" name=\"day\" value=\"$day\"/>");
print("<input type=\"hidden\" name=\"year\" value=\"$year\"/>");
print("<input type=\"hidden\" name=\"b_uur\" value=\"$b_uur\"/>");
print("<input type=\"hidden\" name=\"conty\" value=\"$vak\"/>");
?>
and here follow the code of the file databaseinput which "normally" would insert information into mysql
HERE IS THE PROBLEM WITH THE FOR-LOOP
<?php
$conn=mysql_connect("localhost", "****", "**") or die("Can't connect: " . mysql_error());
mysql_select_db("db*****");
for ($i=0;$i<($_GET[row]);$i++)
{
mysql_query("INSERT INTO nonabsent(USERID, SURNAME, NAME, LESSON, BEGINHOUR, DAY, MONTH, YEAR) values ('$_GET[userid]', '$_GET[givenName]', '$_GET[name]', '$_GET[conty]','$_GET[b_uur]', '$_GET[day]', '$_GET[month]', '$_GET[year]')");
$j++;
}
echo ("There are $j data insert into mysql database");
mysql_close($conn);
?>
thanx in advance
ps: the server doesn't give any error in the code