Jump to content

youngtorise

Members
  • Posts

    3
  • Joined

  • Last visited

youngtorise's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Ok now the display just prints: Array[1] or Array[2] in all the places
  2. Ok I have now fixed the quotes and now nothing shows up in the place of where the variables are as if they equal nothing?
  3. Hello, I am currently trying to take an html form with array entry, then store these array's into $_SESSION. Please help. The code is listed below. This is the form: <form method="post" action="system/processor/ac36e5fbdefed15a4daf3d7008723c87.php"> <p><table cellpadding=5 cellspacing=5 rules=none width="100%"> <tr> <th>Date</th> <th> </th> <th> </th> <th>Start Time</th> <th>End Time</th> </tr> <?php session_start(); $i = 1; while($i <= "$_SESSION[amt_dates]") { echo("<tr>"); echo("<td><select name=\"month[]\"> <option value=\"01\">January</option> <option value=\"02\">Febuary</option> <option value=\"03\">March</option> <option value=\"04\">April</option> <option value=\"05\">May</option> <option value=\"06\">June</option> <option value=\"07\">July</option> <option value=\"08\">August</option> <option value=\"09\">September</option> <option value=\"10\">October</option> <option value=\"11\">November</option> <option value=\"12\">December</option> </select></td>"); echo("<td><select name=\"day[]\">"); $h=1; while($h <= 31) { echo("<option value=\"$h\">$h</option>"); $h++; } echo("</select></td>"); echo("<td><select name=\"year[]\">"); $e= date(Y) + 10; $u = date(Y); while($u <= $e) { echo("<option value=\"$u\">$u</option>"); $u++; } echo("</select></td>"); echo("<td><select name=\"s_time[]\"> <option value=\"8\">8:00 AM</option> <option value=\"9\">9:00 AM</option> <option value=\"10\">10:00 AM</option> <option value=\"11\">11:00 AM</option> <option value=\"12\">12:00 PM</option> <option value=\"13\">1:00 PM</option> <option value=\"14\">2:00 PM</option> <option value=\"15\">3:00 PM</option> <option value=\"16\">4:00 PM</option> <option value=\"17\">5:00 PM</option> <option value=\"18\">6:00 PM</option> <option value=\"19\">7:00 PM</option> <option value=\"20\">8:00 PM</option> <option value=\"21\">9:00 PM</option></select></td>"); echo("<td><select name=\"e_time[]\"> <option value=\"8\">8:00 AM</option> <option value=\"9\">9:00 AM</option> <option value=\"10\">10:00 AM</option> <option value=\"11\">11:00 AM</option> <option value=\"12\">12:00 PM</option> <option value=\"13\">1:00 PM</option> <option value=\"14\">2:00 PM</option> <option value=\"15\">3:00 PM</option> <option value=\"16\">4:00 PM</option> <option value=\"17\">5:00 PM</option> <option value=\"18\">6:00 PM</option> <option value=\"19\">7:00 PM</option> <option value=\"20\">8:00 PM</option> <option value=\"21\">9:00 PM</option></select></td>"); $i++; } ?> <tr> <td colspan="5"><center><input type="submit" value="Add Dates To Order"></center></td> </tr> </table> </form> ac36e5fbdefed15a4daf3d7008723c87.php: <?phpsession_start();require('sql.php');#$a = "$_SESSION[amt_dates]";#$i = 1;#while($i <= $a){#Month$_SESSION['month'][$i] = "$_POST[month][$i]";$i++;}#$i = 1;#while($i <= $a){#day$_SESSION['day'][$i] = "$_POST[day][$i]";$i++;}#$i = 1;#while($i <= $a){#year$_SESSION['year'][$i] = "$_POST[year][$i]";$i++;}#$i = 1;#while($i <= $a){#s_time$_SESSION['s_time'][$i] = "$_POST[s_time][$i]";$i++;}#$i = 1;#while($i <= $a){#e_time$_SESSION['e_time'][$i] = "$_POST[e_time][$i]";$i++;}##header("location: http://www.pickinpal.zxq.net/review.php");exit;?> review.php: <form method="post" action=""> <p><table cellpadding=5 cellspacing=5 rules=none width="100%"> <tr> <th>Date</th> <th> </th> <th> </th> <th>Start Time</th> <th>End Time</th> </tr> <?php session_start(); # $a = "$_SESSION[amt_dates]"; # $i = 0; # while($i <= $a) { # echo("<tr>"); echo("<td>" . $_SESSION[month]['$i'] . "</td>"); echo("<td>" . $_SESSION[day]['$i'] . "</td>"); echo("<td>" . $_SESSION[year]['$i'] . "</td>"); echo("<td>" . $_SESSION[s_time]['$i'] . "</td>"); echo("<td>" . $_SESSION[e_time]['$i'] . "</td>"); echo("</tr>"); $i++; } # ?> </table></p>
×
×
  • Create New...