Here's some error checking for ya
<?php
if ($give) {
echo "Evaluating give part of if statement<br>"; // lets you know if this part of the if is even being evaluated
$q_string1 = "SELECT * FROM vaccinations WHERE vaccinationid='$give'";
print $q_string1 . "<br>"; // look at the query that is being sent to mysql to make sure all variables are being passed
$qry = mysql_query($q_string1) or die(mysql_error()); // use mysql_error for error checking
$qnum = mysql_numrows($qry);
$q=0;
while ($q<$qnum) {
$vvid=mysql_result($qry,$q,"vaccinationid");
echo ("<form><input type=text name=admdate><input type=submit name=submit value=Log!></form>");
++$q; // don't you mean $q++
}
}
if ($submit) {
echo "Evaluating submit part of if statement<br>"; // lets you know if this part of the if is even being evaluated
$q_string = "UPDATE vaccinations set admindate='$admdate' where vaccinationid='$vvid'";
print $q_string . "<br>"; // look at the query that is being sent to mysql to make sure all variables are being passed
$u = mysql_query($q_string) or die(mysql_error()); // use mysql_error for error checking
}
?>
On your form variables, you're saying if $give or if $submit, but are you sure register globals are on? Globals are set to off by default, so you should probably say if($POST['give']) and if($POST['submit'])
Cgraz