Why won't this post?

I’m obviously missing something simple. I returning no errors, I’ve error checked, made sure that all variables are being passed through the pages. Everything SHOULD be working but it’s not updating the database. If you don’t mind, could you take a look and see if you can tell me why? I’m asking it to update by looking at the $id variable which is the line number. Again, thank you! This forum has been a huge help in my quest to learn PHP.

while ($i < $num) {

<form action="volchanged.php" method="post">
<table border='1'>
<th>Student ID</th>
<th>Person Working</th>
<th>March 1st</th>
<th>March 2nd</th>
<th>March 15th</th>
<th>March 16th</th>
<th>April 5th</th>
<th>April 10th</th>
<th>April 11th</th>
<td><input type="hidden" size="5" name="ud_id" value="<? echo "$id"?>"></td>
<td><input type="text" size="5" name="ud_sid" value="<? echo "$sid"?>"></td>
<td><input type="text" name="ud_wperson" value="<? echo "$wperson"?>"></td>
<td><input type="text" name="ud_student" value="<? echo "$student"?>"></td>
<td><input type="text" size="6" name="ud_hours1" value="<? echo "$hours1"?>"></td>
<td><input type="text" size="6" name="ud_hours2" value="<? echo "$hours2"?>"></td>
<td><input type="text" size="6" name="ud_hours3" value="<? echo "$hours3"?>"></td>
<td><input type="text" size="6" name="ud_hours4" value="<? echo "$hours4"?>"></td>
<td><input type="text" size="6" name="ud_hours5" value="<? echo "$hours5"?>"></td>
<td><input type="text" size="6" name="ud_hours6" value="<? echo "$hours6"?>"></td></tr>

<input type="Submit" value="Submit">


And the post page:

include 'header.htm';


echo "$ud_id";
echo "<br>";
echo "$ud_hours1";


$query="UPDATE 'volunteer' SET sid='$ud_sid', wperson='$ud_wperson', student='$ud_student', 
       hours1='$ud_hours1', hours2='$ud_hours2', hours3='$ud_hours3',
       hours4='$ud_hours4', hours5='$ud_hours5', hours6='$ud_hours6', WHERE id='$ud_id'"
       or die ("Database could not be updated.");


Thank you again for all of your help!

Hmmm… Seems to me I have seen this somewhere else… OH YEAH, viewtopic.php?f=2&t=8605

Please try not to double post.


Sponsor our Newsletter | Privacy Policy | Terms of Service