jeff5656 Posted November 27, 2008 Share Posted November 27, 2008 In the editcurrent.php the value for which_month is blank: include ("../connectdb.php"); $curr_month = $_POST['which_month']; $consultsq1 = "SELECT * FROM `staffsched` WHERE `which_month`='".$curr_month."'"; $result = mysql_query ($consultsq1) or die ("Invalid query: " . mysql_error ()); $row = mysql_fetch_array ($result); ?> Here is the form that sends that value: <form name="pickmonth" method="post" action="editcurrent.php"><input type="hidden" name ="which_date" value="<?php echo $row['which_month']; ?>"/> <input type="submit" value="Edit"/></form> FYI, when I echo $row['which_month'] in this form, I do get the correct current month. Quote Link to comment https://forums.phpfreaks.com/topic/134537-solved-post-value-is-blank/ Share on other sites More sharing options...
gaza165 Posted November 27, 2008 Share Posted November 27, 2008 The POST Variable that is looking for is the name of your hidden input change your hidden input's name to which_month... <form name="pickmonth" method="post" action="editcurrent.php"><input type="hidden" name ="which_month" value="<?php echo $row['which_month']; ?>"/> <input type="submit" value="Edit"/></form> Quote Link to comment https://forums.phpfreaks.com/topic/134537-solved-post-value-is-blank/#findComment-700515 Share on other sites More sharing options...
.josh Posted November 27, 2008 Share Posted November 27, 2008 form value is called which_date but you assign 'which_month' to $curr_month Quote Link to comment https://forums.phpfreaks.com/topic/134537-solved-post-value-is-blank/#findComment-700516 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.