PGTibs Posted February 6, 2009 Share Posted February 6, 2009 Im making an admin panel for a wedding planner site, on this site is a timetable which you can add and take away client information. The original site is taken from a dj panel i used to use. However, the form for the timetable keeps kicking the error... Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a3341104/public_html/The Wedding Booth Admin Panel/timetable/form.php on line 92 form.php looks like this... <? session_start(); include 'dbConfig.php'; $ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) { //if the username is not set or the session username is empty or the ip does not match the session ip log them out session_unset(); //clears firefox session_destroy(); //clears IE die("Error!!!"); } include("online.php");?> <font face="verdana" size="1"> <html> <head> <title>Staff Control Panel</title> <link href="../staff/style.css" rel="stylesheet" type="text/css"> </head> <body> <a href="index.php"><<< Back</a><br> <p align="justify" class="heading"><b><u>Add A Client Into The Time Table</b></u></p> <p align="left" class="main">Fill Out The Form Below To Add A Client To The Timetable.<br><b>To Delete A Perm Slot Please Select The Time And Day Of It And Then Add A Dash (-) Into The Client Box</p> <form action="addperm.php" method="post"> <table width="50%" border="0" cellspacing="0" cellpadding="2" class="main" align="center"> <tr> <td width="40%"><font face="verdana" size="1"><b>Day:</b></font></td> <td width="60%"> <select name="day" id="day"> <option value="monday" selected>Monday</option> <option value="tuesday">Tuesday</option> <option value="wednesday">Wednesday</option> <option value="thursday">Thursday</option> <option value="friday">Friday</option> <option value="saturday">Saturday</option> <option value="sunday">Sunday</option> </select> </td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Timeslot:</b></td> <td width="60%"> <select name="time" id="select"> <option value="a" selected>00:00 - 01:00</option> <option value="b">01:00 - 02:00</option> <option value="c">02:00 - 03:00</option> <option value="d">03:00 - 04:00</option> <option value="e">04:00 - 05:00</option> <option value="f">05:00 - 06:00</option> <option value="g">06:00 - 07:00</option> <option value="x">07:00 - 08:00</option> <option value="h">08:00 - 09:00</option> <option value="i">09:00 - 10:00</option> <option value="j">10:00 - 11:00</option> <option value="k">11:00 - 12:00</option> <option value="l">12:00 - 13:00</option> <option value="m">13:00 - 14:00</option> <option value="n">14:00 - 15:00</option> <option value="o">15:00 - 16:00</option> <option value="p">16:00 - 17:00</option> <option value="q">17:00 - 18:00</option> <option value="r">18:00 - 19:00</option> <option value="s">19:00 - 20:00</option> <option value="t">20:00 - 21:00</option> <option value="u">21:00 - 22:00</option> <option value="v">22:00 - 23:00</option> <option value="w">23:00 - 00:00</option> </select></td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Client Name:</b></td> <td width="60%"> <input name="showname" type="text" size="30" maxlength="50"></td> </tr> <tr><td><b><font size="1">Is This A Permanent Meeting?*</b></font></td><td><input name="perm" type="checkbox" value="perm"></td></tr> <tr> <td colspan="2" align="center" valign="middle"><input name="Submit" type="submit" value="Submit" style="font: verdana,arial; font-size: 10px; font-weight: bold"> <input name="Reset" type="reset" value="Reset" style="font: verdana,arial; font-size: 10px; font-weight: bold"></td> </tr> </table> </form> <font size="1">* This is for when you will be using this slot weekly, it can be removed as stated above.</font> </body> </html> <?php include ("dbConfig.php"); $time = $_GET['time']; $result = mysql_query("SELECT * FROM permmonday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Mondays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permtuesday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Tuesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permwednesday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Wednesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permthursday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Thursdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permfriday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Fridays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permsaturday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Saturdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permsunday"); $num = mysql_num_rows($result); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Sundays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } if($time == 'booked'){ echo "<b><br><br><br>Client Information Added...</b>"; } ?> </font> When you submit the form it does the correct thing however it doesn't add anything to the database and so the timetable doesn't get updated. There is also the error stated above. Can anyone see the problem and how to solve it? Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/ Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 First change; $result = mysql_query("SELECT * FROM permmonday"); $num = mysql_num_rows($result); to $result = mysql_query("SELECT * FROM permmonday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755845 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Ok so i did the same for the rest of the days aswell and then ran the form, it came back with... Table 'a3341104_testing.permmonday' doesn't exist Code now looks like... <? session_start(); include 'dbConfig.php'; $ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) { //if the username is not set or the session username is empty or the ip does not match the session ip log them out session_unset(); //clears firefox session_destroy(); //clears IE die("Error!!!"); } include("online.php");?> <font face="verdana" size="1"> <html> <head> <title>Staff Control Panel</title> <link href="../staff/style.css" rel="stylesheet" type="text/css"> </head> <body> <a href="index.php"><<< Back</a><br> <p align="justify" class="heading"><b><u>Add A Client Into The Time Table</b></u></p> <p align="left" class="main">Fill Out The Form Below To Add A Client To The Timetable.<br><b>To Delete A Perm Slot Please Select The Time And Day Of It And Then Add A Dash (-) Into The Client Box</p> <form action="addperm.php" method="post"> <table width="50%" border="0" cellspacing="0" cellpadding="2" class="main" align="center"> <tr> <td width="40%"><font face="verdana" size="1"><b>Day:</b></font></td> <td width="60%"> <select name="day" id="day"> <option value="monday" selected>Monday</option> <option value="tuesday">Tuesday</option> <option value="wednesday">Wednesday</option> <option value="thursday">Thursday</option> <option value="friday">Friday</option> <option value="saturday">Saturday</option> <option value="sunday">Sunday</option> </select> </td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Timeslot:</b></td> <td width="60%"> <select name="time" id="select"> <option value="a" selected>00:00 - 01:00</option> <option value="b">01:00 - 02:00</option> <option value="c">02:00 - 03:00</option> <option value="d">03:00 - 04:00</option> <option value="e">04:00 - 05:00</option> <option value="f">05:00 - 06:00</option> <option value="g">06:00 - 07:00</option> <option value="x">07:00 - 08:00</option> <option value="h">08:00 - 09:00</option> <option value="i">09:00 - 10:00</option> <option value="j">10:00 - 11:00</option> <option value="k">11:00 - 12:00</option> <option value="l">12:00 - 13:00</option> <option value="m">13:00 - 14:00</option> <option value="n">14:00 - 15:00</option> <option value="o">15:00 - 16:00</option> <option value="p">16:00 - 17:00</option> <option value="q">17:00 - 18:00</option> <option value="r">18:00 - 19:00</option> <option value="s">19:00 - 20:00</option> <option value="t">20:00 - 21:00</option> <option value="u">21:00 - 22:00</option> <option value="v">22:00 - 23:00</option> <option value="w">23:00 - 00:00</option> </select></td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Client Name:</b></td> <td width="60%"> <input name="showname" type="text" size="30" maxlength="50"></td> </tr> <tr><td><b><font size="1">Is This A Permanent Meeting?*</b></font></td><td><input name="perm" type="checkbox" value="perm"></td></tr> <tr> <td colspan="2" align="center" valign="middle"><input name="Submit" type="submit" value="Submit" style="font: verdana,arial; font-size: 10px; font-weight: bold"> <input name="Reset" type="reset" value="Reset" style="font: verdana,arial; font-size: 10px; font-weight: bold"></td> </tr> </table> </form> <font size="1">* This is for when you will be using this slot weekly, it can be removed as stated above.</font> </body> </html> <?php include ("dbConfig.php"); $time = $_GET['time']; $result = mysql_query("SELECT * FROM permmonday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Mondays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permtuesday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Tuesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permwednesday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Wednesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permthursday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Thursdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permfriday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Fridays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permsaturday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Saturdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM permmsunday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Sundays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } if($time == 'booked'){ echo "<b><br><br><br>Client Information Added...</b>"; } ?> </font> Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755850 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 The error is pretty self explanatory Table 'a3341104_testing.permmonday' doesn't exist Check your database a3341104_testing for the table permmonday Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755854 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Thats the problem though, it does exist as far as i know. I'll have a fiddle around to see if i can't make it work. UPDATE: So i realised its calling for permmonday etc when its only monday, so i changed this and now it just dies? It doesn't submit the form at all :S <? session_start(); include 'dbConfig.php'; $ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) { //if the username is not set or the session username is empty or the ip does not match the session ip log them out session_unset(); //clears firefox session_destroy(); //clears IE die("Error!!!"); } include("online.php");?> <font face="verdana" size="1"> <html> <head> <title>Staff Control Panel</title> <link href="../staff/style.css" rel="stylesheet" type="text/css"> </head> <body> <a href="index.php"><<< Back</a><br> <p align="justify" class="heading"><b><u>Add A Client Into The Time Table</b></u></p> <p align="left" class="main">Fill Out The Form Below To Add A Client To The Timetable.<br><b>To Delete A Perm Slot Please Select The Time And Day Of It And Then Add A Dash (-) Into The Client Box</p> <form action="addperm.php" method="post"> <table width="50%" border="0" cellspacing="0" cellpadding="2" class="main" align="center"> <tr> <td width="40%"><font face="verdana" size="1"><b>Day:</b></font></td> <td width="60%"> <select name="day" id="day"> <option value="monday" selected>Monday</option> <option value="tuesday">Tuesday</option> <option value="wednesday">Wednesday</option> <option value="thursday">Thursday</option> <option value="friday">Friday</option> <option value="saturday">Saturday</option> <option value="sunday">Sunday</option> </select> </td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Timeslot:</b></td> <td width="60%"> <select name="time" id="select"> <option value="a" selected>00:00 - 01:00</option> <option value="b">01:00 - 02:00</option> <option value="c">02:00 - 03:00</option> <option value="d">03:00 - 04:00</option> <option value="e">04:00 - 05:00</option> <option value="f">05:00 - 06:00</option> <option value="g">06:00 - 07:00</option> <option value="x">07:00 - 08:00</option> <option value="h">08:00 - 09:00</option> <option value="i">09:00 - 10:00</option> <option value="j">10:00 - 11:00</option> <option value="k">11:00 - 12:00</option> <option value="l">12:00 - 13:00</option> <option value="m">13:00 - 14:00</option> <option value="n">14:00 - 15:00</option> <option value="o">15:00 - 16:00</option> <option value="p">16:00 - 17:00</option> <option value="q">17:00 - 18:00</option> <option value="r">18:00 - 19:00</option> <option value="s">19:00 - 20:00</option> <option value="t">20:00 - 21:00</option> <option value="u">21:00 - 22:00</option> <option value="v">22:00 - 23:00</option> <option value="w">23:00 - 00:00</option> </select></td> </tr> <tr> <td width="40%"><font face="verdana" size="1"><b>Client Name:</b></td> <td width="60%"> <input name="showname" type="text" size="30" maxlength="50"></td> </tr> <tr><td><b><font size="1">Is This A Permanent Meeting?*</b></font></td><td><input name="perm" type="checkbox" value="perm"></td></tr> <tr> <td colspan="2" align="center" valign="middle"><input name="Submit" type="submit" value="Submit" style="font: verdana,arial; font-size: 10px; font-weight: bold"> <input name="Reset" type="reset" value="Reset" style="font: verdana,arial; font-size: 10px; font-weight: bold"></td> </tr> </table> </form> <font size="1">* This is for when you will be using this slot weekly, it can be removed as stated above.</font> </body> </html> <?php include ("dbConfig.php"); $time = $_GET['time']; $result = mysql_query("SELECT * FROM monday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Mondays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM tuesday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Tuesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM wednesday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Wednesdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM thursday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Thursdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM friday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Fridays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM saturday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Saturdays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } $result = mysql_query("SELECT * FROM sunday") or die(mysql_error()); $num = mysql_num_rows($result) or die(mysql_error()); $i = 0; while ($i < $num){ $a = mysql_result($result,$i,"a"); $b = mysql_result($result,$i,"b"); $c = mysql_result($result,$i,"c"); $d = mysql_result($result,$i,"d"); $e = mysql_result($result,$i,"e"); $f = mysql_result($result,$i,"f"); $g = mysql_result($result,$i,"g"); $x = mysql_result($result,$i,"x"); $h = mysql_result($result,$i,"h"); $ti = mysql_result($result,$i,"i"); $j = mysql_result($result,$i,"j"); $k = mysql_result($result,$i,"k"); $l = mysql_result($result,$i,"l"); $m = mysql_result($result,$i,"m"); $n = mysql_result($result,$i,"n"); $o = mysql_result($result,$i,"o"); $p = mysql_result($result,$i,"p"); $q = mysql_result($result,$i,"q"); $r = mysql_result($result,$i,"r"); $s = mysql_result($result,$i,"s"); $t = mysql_result($result,$i,"t"); $u = mysql_result($result,$i,"u"); $v = mysql_result($result,$i,"v"); $w = mysql_result($result,$i,"w"); echo "<b> Sundays Perm Shows:</b><hr color=\"#000000\" width=\"40%\" align=\"left\">"; if (!$a == ''){ echo "00:00 - 01:00: $a<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$b == ''){ echo "01:00 - 02:00: $b<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$c == ''){ echo "02:00 - 03:00: $c<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$d == ''){ echo "03:00 - 04:00: $d<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$e == ''){ echo "04:00 - 05:00: $e<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$f == ''){ echo "05:00 - 06:00: $f<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$g == ''){ echo "06:00 - 07:00: $g<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$x == ''){ echo "07:00 - 08:00: $x<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$h == ''){ echo "08:00 - 09:00: $h<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$ti == ''){ echo "09:00 - 10:00: $ti<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$j == ''){ echo "10:00 - 11:00: $j<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$k == ''){ echo "11:00 - 12:00: $k<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$l == ''){ echo "12:00 - 13:00: $l<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$m == ''){ echo "13:00 - 14:00: $m<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$n == ''){ echo "14:00 - 15:00: $n<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$o == ''){ echo "15:00 - 16:00: $o<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$p == ''){ echo "16:00 - 17:00: $p<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$q == ''){ echo "17:00 - 18:00: $q<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$r == ''){ echo "18:00 - 19:00: $r<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$s == ''){ echo "19:00 - 20:00: $s<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$t == ''){ echo "20:00 - 21:00: $t<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$u == ''){ echo "21:00 - 22:00: $u<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$v == ''){ echo "22:00 - 23:00: $v<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } if (!$w == ''){ echo "23:00 - 00:00: $w<hr color=\"#000000\" width=\"40%\" align=\"left\">"; } $i++; } if($time == 'booked'){ echo "<b><br><br><br>Client Information Added...</b>"; } ?> </font> Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755857 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 Thats the problem though, it does exist as far as i know. I'll have a fiddle around to see if i can't make it work. Do you use phpMyAdmin?? Just go look! Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755860 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Yeh i used it to check, read edited message above Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755862 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 You're including 'dbConfig.php'; twice, if you're unsure use include_once('dbConfig.php'); Can't actually see a problem yet though. Have you got errors set to display? Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755864 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Have a look... http://websitetesting.net46.net/The%20Wedding%20Booth%20Admin%20Panel/index.php Username: Admin Password: changeme The timetable should update once the forms posted but its failing to do so. Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755873 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 After this line; $result = mysql_query("SELECT * FROM monday") or die(mysql_error()); add $details = mysql_fetch_assoc($result); echo '<pre>'; var_dump($details); echo '</pre>'; die; then see what prints out Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755877 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Done, it replied with bool(false) that means? Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755899 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 You're not getting anything from the table, is there any data in your table? Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755973 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 No there isnt, however... I just ran the website in offline mode using xampp and hidden parts appeared. Theres a small list underneath that table which is what updates with the information so its not meant to appear on the time table at all. Any clue on making it appear on the timetable? If other pages are needed to make this work just ask and i'l try and provide. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755992 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 Not that this is what is causing the problem but you have huge problems with your html. Half of it is outside the html tags, above and bellow e.g; <font face="verdana" size="1"> <html> <head> Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-755999 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 If i'm completely honest, the reason there are so many errors is that i don't go for clean coding like everyone else, i do it until it does what i need it too do. Hence the html problems Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756024 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 In all honesty, it makes it very difficult to read and follow which has left me a little bit stumped Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756028 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 Sorry, didn't think about it at the time... I might just try and stick with a more simple solution or try and start again, all its doing is calling for the info on a certain table etc, just time consuming. Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756073 Share on other sites More sharing options...
gevans Posted February 6, 2009 Share Posted February 6, 2009 Why not use a link? http://www.your-domain.com/your-page.php?instead-of-form=clicked Obviously use more sensible GET data Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756078 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 I managed to sort it out, i dropped the form idea and made it into a list, i'll update the site link i posted earlier, later on so you can see it. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756251 Share on other sites More sharing options...
PGTibs Posted February 6, 2009 Author Share Posted February 6, 2009 http://websitetesting.net46.net/panel/index.php Username: Admin Password: changeme The timetable managed to become sorted, check it out Quote Link to comment https://forums.phpfreaks.com/topic/144051-solved-form-problem/#findComment-756325 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.