Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Feb 2006
    Location
    Inside your PC
    Posts
    1,626
    Tokens
    0

    Latest Awards:

    Default DJ Timetable Help Needed

    Right i have the panel that most sites have

    its not radiopanels.com nor organiseds panel

    Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/habboatt/public_html/staffarea/timetable/wednesday.php on line 6

    thats the error i get

    can anyone help
    +rep given

  2. #2
    Join Date
    Feb 2006
    Location
    Inside your PC
    Posts
    1,626
    Tokens
    0

    Latest Awards:

    Default

    These are the 2 that are a comparision


    monday.php works
    wednesday.php does not

    heres wednesday
    <? session_start();
    include 'dbConfig.php';
    ?>
    <?php
    include ("dbConfig.php");
    $query = "SELECT * FROM wednesday";
    $result = mysql_query($query);
    $update = $_GET['update'];
    $num = mysql_numrows($result);
    $user = $_SESSION['session_username'];
    $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");
    $i++;
    }
    $update = $_GET['update'];
    $delete = $_GET['delete'];
    ?>
    <html><body bgcolor="#FDDF85">
    <head><font face="Verdana" size="1"><title>radio habbo Staff Control Panel: Slot Booking</title></head>
    <link href="../staff/style.css" rel="stylesheet" type="text/css">
    </font>
    <body>
    <font face="verdana" size="1">
    <p align="left" class="heading">&nbsp;</p>
    </font>
    <font face="Verdana" size="1">
    <p align="left" class="main">Find out when your fav dj is online!</p></font>
    <center>
    <font face="Verdana" size="1">
    <a href="#" onClick="window.history.go(-1)">Go Back ?</a>&nbsp;~&nbsp;<a href="javascriptocation.reload(true)">Refresh ?</a>
    </font>
    <table border="1" bordercolor="#000000" width="45%" class="main"
    cellpadding="2" cellspacing="0">
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">00:00 - 01:00</font></td>
    <td><font face="Verdana" size="1"><?php if($a == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$a";
    }
    }
    ?>
    </font>
    </td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">01:00 - 02:00</font></td>
    <td><font face="Verdana" size="1"><?php if($b == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($user == $check){
    echo"Slot not booked";
    }
    else{
    echo "$b";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">02:00 - 03:00</font></td>
    <td><font face="Verdana" size="1"><?php if($c == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$c";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">03:00 - 04:00</font></td>
    <td><font face="Verdana" size="1"><?php if($d == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$d";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">04:00 - 05:00</font></td>
    <td><font face="Verdana" size="1"><?php if($e == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$e";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">05:00 - 06:00</font></td>
    <td><font face="Verdana" size="1"><?php if($f == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$f";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">06:00 - 07:00</font></td>
    <td><font face="Verdana" size="1"><?php if($g == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$g";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">07:00 - 08:00</font></td>
    <td><font face="Verdana" size="1"><?php if($x == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$x";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">08:00 - 09:00</font></td>
    <td><font face="Verdana" size="1"><?php if($h == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$h";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">09:00 - 10:00</font></td>
    <td><font face="Verdana" size="1"><?php if($ti == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$ti";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">10:00 - 11:00</font></td>
    <td><font face="Verdana" size="1"><?php if($j == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$j";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">11:00 - 12:00</font></td>
    <td><font face="Verdana" size="1"><?php if($k == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$k";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">12:00 - 13:00</font></td>

    <td><font face="Verdana" size="1"><?php if($l == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$l";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">13:00 - 14:00</font></td>
    <td><font face="Verdana" size="1"><?php if($m == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$m";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">14:00 - 15:00</font></td>

    <td><font face="Verdana" size="1"><?php if($n == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$n";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">15:00 - 16:00</font></td>

    <td><font face="Verdana" size="1"><?php if($o == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$o";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">16:00 - 17:00</font></td>

    <td><font face="Verdana" size="1"><?php if($p == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$p";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">17:00 - 18:00</font></td>

    <td><font face="Verdana" size="1"><?php if($q == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$q";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">18:00 - 19:00</font></td>
    <td><font face="Verdana" size="1"><?php if($r == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$r";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">19:00 - 20:00</font></td>

    <td><font face="Verdana" size="1"><?php if($s == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$s";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">20:00 - 21:00</font></td>

    <td><font face="Verdana" size="1"><?php if($t == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$t";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">21:00 - 22:00</font></td>
    <td><font face="Verdana" size="1"><?php if($u == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$u";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">22:00 - 23:00</font></td>
    <td><font face="Verdana" size="1"><?php if($v == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$v";
    }
    }
    ?></font></td>

    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">23:00 - 00:00</font></td>
    <td><font face="Verdana" size="1"><?php if($w == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$w";
    }
    }
    ?></font></td>
    </tr>
    </table>
    </center>
    </body>
    <?php
    if ($update == a){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET a='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == b){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET b='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == c){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET c='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == d){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET d='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == e){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET e='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == f){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET f='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == x){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET x='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == g){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET g='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == h){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET h='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == ti){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET i='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == j){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;

    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET j='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == k){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET k='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == l){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET l='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == m){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET m='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == n){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET n='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == o){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET o='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == p){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET p='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == q){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET q='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == r){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET r='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == s){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET s='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == t){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET t='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == u){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET u='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == v){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET v='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == w){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE wednesday SET w='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }



    elseif ($update == ra){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET a=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rb){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET b=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rc){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET c=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rd){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET d=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == re){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET e=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rf){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET f=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rx){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET x=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rg){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET g=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rh){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET h=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ri){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET i=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rj){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET j=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rk){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET k=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rl){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET l=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rm){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET m=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rn){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET n=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ro){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET o=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rp){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET p=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rq){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET q=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rr){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET r=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rs){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET s=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rt){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET t=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ru){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET u=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rv){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET v=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rw){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE wednesday SET w=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djwednesday.php\");
    -->
    </script>";
    }
    else{}
    }
    ?>

    and heres monday
    <? session_start();
    include 'dbConfig.php';
    ?>
    <?php
    include ("dbConfig.php");
    $query = "SELECT * FROM monday";
    $result = mysql_query($query);
    $update = $_GET['update'];
    $num = mysql_numrows($result);
    $user = $_SESSION['session_username'];
    $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");
    $i++;
    }
    $update = $_GET['update'];
    $delete = $_GET['delete'];
    ?><body bgcolor="#FDDF85">
    <html>
    <head><title>Staff Control Panel: Slot Booking</title></head>
    <link href="../staff/style.css" rel="stylesheet" type="text/css">
    <body>
    <font face="Verdana" size="1">
    <p align="left" class="heading"><b><u>Monday</u></b></p>
    <p align="left" class="main">Find out when your fav dj is online!</p></font>
    <center>

    <table border="1" bordercolor="#000000" width="80%" class="main"
    cellpadding="2" cellspacing="0">
    <tr>
    <td width="100" align="center"><font face="Verdana" size="1">00:00 - 01:00</font></td>
    <td><font face="Verdana" size="1"><?php if($a == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$a";
    }
    }
    ?>
    </font>
    </td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">01:00 - 02:00</font></td>
    <td><font face="Verdana" size="1"><?php if($b == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$b";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">02:00 - 03:00</font></td>
    <td><font face="Verdana" size="1"><?php if($c == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$c";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">03:00 - 04:00</font></td>
    <td><font face="Verdana" size="1"><?php if($d == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$d";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">04:00 - 05:00</font></td>
    <td><font face="Verdana" size="1"><?php if($e == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$e";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">05:00 - 06:00</font></td>
    <td><font face="Verdana" size="1"><?php if($f == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$f";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">06:00 - 07:00</font></td>
    <td><font face="Verdana" size="1"><?php if($g == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$g";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">07:00 - 08:00</font></td>
    <td><font face="Verdana" size="1"><?php if($x == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$x";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">08:00 - 09:00</font></td>
    <td><font face="Verdana" size="1"><?php if($h == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$h";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">09:00 - 10:00</font></td>
    <td><font face="Verdana" size="1"><?php if($ti == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$ti";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">10:00 - 11:00</font></td>
    <td><font face="Verdana" size="1"><?php if($j == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$j";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">11:00 - 12:00</font></td>
    <td><font face="Verdana" size="1"><?php if($k == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$k";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">12:00 - 13:00</font></td>

    <td><font face="Verdana" size="1"><?php if($l == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$l";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">13:00 - 14:00</font></td>
    <td><font face="Verdana" size="1"><?php if($m == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$m";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">14:00 - 15:00</font></td>

    <td><font face="Verdana" size="1"><?php if($n == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$n";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">15:00 - 16:00</font></td>

    <td><font face="Verdana" size="1"><?php if($o == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$o";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">16:00 - 17:00</font></td>

    <td><font face="Verdana" size="1"><?php if($p == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$p";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">17:00 - 18:00</font></td>

    <td><font face="Verdana" size="1"><?php if($q == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$q";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">18:00 - 19:00</font></td>
    <td><font face="Verdana" size="1"><?php if($r == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$r";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">19:00 - 20:00</font></td>

    <td><font face="Verdana" size="1"><?php if($s == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$s";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">20:00 - 21:00</font></td>

    <td><font face="Verdana" size="1"><?php if($t == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$t";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">21:00 - 22:00</font></td>
    <td><font face="Verdana" size="1"><?php if($u == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$u";
    }
    }
    ?></font></td>
    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">22:00 - 23:00</font></td>
    <td><font face="Verdana" size="1"><?php if($v == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$v";
    }
    }
    ?></font></td>

    </tr>
    <tr>

    <td width="100" align="center"><font face="Verdana" size="1">23:00 - 00:00</font></td>
    <td><font face="Verdana" size="1"><?php if($w == ''){
    echo"Slot not booked";
    }
    else{
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($user == $check){

    }
    else{
    echo "$w";
    }
    }
    ?></font></td>
    </tr>
    </table>
    </center>
    </body>
    <?php
    if ($update == a){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET a='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == b){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET b='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == c){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET c='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == d){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET d='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == e){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET e='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == f){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET f='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == x){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET x='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == g){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET g='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == h){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET h='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == ti){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET i='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == j){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;

    }
    if ($check == ''){
    mysql_query("UPDATE monday SET j='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == k){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET k='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == l){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET l='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == m){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET m='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == n){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET n='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == o){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET o='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == p){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET p='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == q){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET q='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == r){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET r='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == s){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET s='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == t){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET t='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == u){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET u='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == v){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET v='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }

    elseif ($update == w){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($check == ''){
    mysql_query("UPDATE monday SET w='$user'");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{
    echo "You cannot book other Dj's Slots!";
    }
    }



    elseif ($update == ra){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"a");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET a=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rb){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"b");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET b=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rc){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"c");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET c=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rd){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"d");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET d=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == re){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"e");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET e=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rf){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"f");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET f=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rx){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"x");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET x=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rg){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"g");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET g=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rh){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"h");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET h=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ri){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"i");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET i=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rj){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"j");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET j=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rk){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"k");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET k=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rl){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"l");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET l=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rm){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"m");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET m=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rn){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"n");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET n=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ro){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"o");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET o=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rp){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"p");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET p=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rq){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"q");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET q=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rr){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"r");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET r=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rs){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"s");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET s=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rt){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"t");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET t=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == ru){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"u");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET u=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rv){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"v");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET v=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }

    elseif ($update == rw){
    $num = mysql_numrows($result);
    $i = 0;
    while($i < $num){
    $check = mysql_result($result,$i,"w");
    $i++;
    }
    if ($user == $check){
    mysql_query("UPDATE monday SET w=''");
    echo "<script language=\"javascript\">
    <!--
    location.replace(\"djmonday.php\");
    -->
    </script>";
    }
    else{}
    }
    ?>

  3. #3
    Join Date
    Jun 2006
    Posts
    498
    Tokens
    0

    Default

    whats monday?

  4. #4
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Eeew who coded that? Its a mess. My timetable script is only 47 lines long.

  5. #5
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Organised
    Eeew who coded that? Its a mess. My timetable script is only 47 lines long.
    for the whole thing or for each day?

  6. #6
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by chris2k6
    for the whole thing or for each day?
    Whole thing.

    I use:

    PHP Code:
    do {
    //My code for displaying slots.
    } while //Code... 

  7. #7
    Join Date
    Jul 2005
    Location
    -
    Posts
    2,995
    Tokens
    0

    Latest Awards:

    Default

    ;l thats rather long i had a look but cud u post monday.php

    edit:
    PHP Code:
    $query "SELECT * FROM wednesday"
    Last edited by Jamie.; 04-06-2006 at 06:03 PM.

  8. #8
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Is the include to the config file correct? + then is the database connection info in the file correct?

  9. #9
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Why are you includeing the config twice? you only need one
    PHP Code:
    <? session_start();
    include 
    'dbConfig.php';
    ?>
    <?php
    include ("dbConfig.php");
    Plus ontopic,

    i belive the problems in the terrible codeing of the script could be the cause rather than an actal error.
    The error is probaly caused becuse there are no rows in the database at the time, If you add a few dummie rows the problem should be resolved.
    The reason you get the error is the script hasnt bothered to ad any check to see if the rows are there.

    Althogh this may not be the case, its often also caused simply by a botched upload, so reuploading my help.

    ALso just for the record mysql_numrows() has been depreasted, you should realy be useing mysql_num_rows()

  10. #10
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Also why are you using javascript to redirect? Use:

    PHP Code:
    header("location: www.blahlbah.com/page.php"); 
    Edit i recomend you use:
    PHP Code:
    require_once("dbConfig.php"); 
    Last edited by Tomm; 05-06-2006 at 05:59 AM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •