SteveTs Posted August 31, 2008 Share Posted August 31, 2008 The problem may be outside of the code copied below, but I thought maybe you guys could see if there is something that jumps out at you as being incorrect. The opi is not being assigned "ds" and causing the entries not to be inserted into the db. <table border=0 cellpadding=0 cellspacing=0><FORM METHOD=\"post\" ACTION=\"football-predictions.php\">"; $result = mysql_query("SELECT * FROM sports_football_predict WHERE week='$currentweek' and year='$currentyear' order by id", $dbi); while(list($id, $year, $week, $home, $away, $prediction) = sql_fetch_row($result, $dbi)) { echo"<tr><td valign=top><img src=\"/images/nfl/helmets/$away.jpg\" width=55 height=50 align=left></td> <td valign=top><img src=\"/images/nfl/helmets/$home.jpg\" width=55 height=50 align=left></td> <td> </td> <td valign=top bgcolor=\"#B3CDC0\"> <table border=0 cellpadding=0 cellspacing=0> <tr><td><img src=\"/images/nfl/bgbox-blueupperleft.gif\" width=9 height=9 border=0></td><td></td></tr> <tr><td></td><td valign=top> <table border=0 cellpadding=3 cellpadding=0><tr><td> <font class=headlinetext>$prediction<br> </td></tr></table></td></tr> <tr><td><img src=\"/images/nfl/bgbox-bluelowerleft.gif\" width=9 height=9 border=0></td><td></td></tr> </table> </td> <td valign=middle bgcolor=\"#435654\" width=100> <table border=0 cellpadding=3 cellspacing=0> <tr><td nowrap><input type=radio value=\"1\" name=\"a$id\"><font class=newsfooterheader> Agree</td></tr> <tr><td nowrap><input type=radio value=\"0\" name=\"a$id\"><font class=newsfooterheader> Disagree</td></tr> </table> </td> </tr><tr><td colspan=5> </td></tr>"; } if ($vbulletin->userinfo['userid']!=0) { echo "<tr><td colspan=2></td><td colspan=3><center> <INPUT type=\"hidden\" name=\"opi\" value=\"ds\"> <INPUT type=\"hidden\" name=\"username\" value=\"$username\"> <center> <table border=0 cellpadding=0 cellspacing=0 width=162 height=28> <tr> <td width=162 height=28><center><input type=image src=\"/images/nfl/linkbg.gif\" width=162 height=28></td> </tr> </table></center></td></form></tr></table><p>"; Quote Link to comment https://forums.phpfreaks.com/topic/122059-hidden-value-not-being-assigned-in-form/ Share on other sites More sharing options...
.josh Posted August 31, 2008 Share Posted August 31, 2008 What about your other hidden var username? is that going through? If not, perhaps your condition is somehow not being met. Quote Link to comment https://forums.phpfreaks.com/topic/122059-hidden-value-not-being-assigned-in-form/#findComment-630096 Share on other sites More sharing options...
SteveTs Posted August 31, 2008 Author Share Posted August 31, 2008 What about your other hidden var username? is that going through? If not, perhaps your condition is somehow not being met. Yes, You can see the submit button which indicates the username condition is met. Quote Link to comment https://forums.phpfreaks.com/topic/122059-hidden-value-not-being-assigned-in-form/#findComment-630105 Share on other sites More sharing options...
.josh Posted August 31, 2008 Share Posted August 31, 2008 and you are using $_POST['opi'] right? If so, then we're going to have to move on to looking at football-predictions.php Quote Link to comment https://forums.phpfreaks.com/topic/122059-hidden-value-not-being-assigned-in-form/#findComment-630115 Share on other sites More sharing options...
SteveTs Posted August 31, 2008 Author Share Posted August 31, 2008 and you are using $_POST['opi'] right? If so, then we're going to have to move on to looking at football-predictions.php I actually posted the full code in another thread here: http://www.phpfreaks.com/forums/index.php/topic,214295.0.html I did not use $_POST['opi'] originally, but have since swapped it out and it still doesn't work. football-predictions.php is the entry page, you enter the picks via the radio buttons, then click submit and are sent back to the page which should show the percentages of what all other readers picked. Quote Link to comment https://forums.phpfreaks.com/topic/122059-hidden-value-not-being-assigned-in-form/#findComment-630117 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.