Results 1 to 7 of 7

Thread: PHP Help

  1. #1
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default PHP Help

    I keep getting this error ; Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 10 in /home/hablaugh/public_html/djpanel/Panel/appstatus.php on line 83


    And this is the code ;
    PHP Code:
    <? 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("Hmm I Wonder Why You Have Ended Up Here :S"); }

    include(
    "online.php");

    ?>



    <?



        
    if (isset($_POST['changeStatus'])) {



            
    $getchangeStatus $_POST['changeStatus'];



            
    mysql_connect($host,$user,$pass) or die("Error: Cannot connect to database.");



            
    mysql_select_db($db) or die("Error: Cannot select database.");



            
    mysql_query("UPDATE application SET Status='$getchangeStatus'");



            
    mysql_close();



            echo 
    "<meta http-equiv=\"Refresh\" content=\"0; URL=appstatus.php\">";



        }



        



        
    mysql_connect($host,$user,$pass) or die("Error: Cannot connect to database.");



        
    mysql_select_db($db) or die("Error: Cannot select database.");







        
    $getStatussql mysql_query("SELECT Status FROM application") or die("Error: Cannot execute query.");







        
    $getStatus mysql_result($getStatussql"Status");





                    



        
    mysql_close();



        



    ?>

    <? if($session_level == "1") { ?>

    <?

    if($session_username == 'Lysine' OR $session_username == 'Lysine'){

    echo 
    "



    <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>



    <html xmlns='http://www.w3.org/1999/xhtml'>



    <head>



    <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />



    <title>Radio Application Status</title>



    <link type='text/css' rel='stylesheet' href='request.css' />



    </head>



    <body>



    <table width='500' border='0' align='center' cellpadding='0' cellspacing='0'>



      <tr>



        <td height='12' valign='top'><div align='center'>



          <form name='changedjsays' method='post' action='appstatus.php'>



    Aloha!, The current Job Application Status is:<br><b>
    $getStatus</b>

    <br><br>



    Turn the website (Note The First Option Is The Current Status):<br>

    <select name='changeStatus'>

    <option>
    $getStatus</option>

    <option>Online</option>

    <option>Offline</option>

    </select>

            <p><input type='submit' name='Submit' value='Submit' /></p>



          </form>

     

    </div></td>

    <div align='center'>

    <center>



    <table border='1' width='473' height='18' style='border-collapse: collapse' bordercolor='#000000'>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#008000'>Some useful HTML tips to 

            use!</font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#FF0000'>&nbsp;&lt;b&gt; <b>Bold Text</b> &lt;/b&gt;</font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana'><font color='#FF0000'>&nbsp;&lt;br&gt; 

            </font> <br>

            <font color='#008000'>Break line 

            (New line)</font></font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#FF0000'>&nbsp;&lt;u&gt; <u>Underlined 

            text</u> &lt;/u&gt;</font></td>

        </tr>



        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#FF0000'>&lt;i&gt; <i>Italic Text </i>

            &lt;/i&gt;</font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font face='Verdana' size='1'><font color='#008000'>Horizontal line:</font><br>

            <font color='#FF0000'>&lt;hr&gt;</font><hr width='20'></font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font face='Verdana' size='1'><font color='#FF0000'>&lt;em&gt;<em> Cheese </em>

            &lt;/em&gt;</font><font color='#008000'> - Also Italics</font></font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#FF0000'>&nbsp;&lt;font 

            face=&quot;Verdana&quot;&gt; Makes the font like this! &lt;/font&gt;</font></td>

        </tr>



        <tr>

            <td height='55' width='473'>

            <p align='center'><font color='#FF0000'><font face='Verdana' size='1'>

            &lt;font size=&quot;2&quot;&gt; </font><font face='Verdana' size='2'>Makes the font this 

            size </font></font><font face='Verdana' size='1'><font color='#FF0000'>

            &lt;/font&gt;</font><br>

            <font color='#008000'>~ Note: The font size tag can be used with the 

            font face tag EG:</font><br>

            <font color='#FF0000'>&lt;font face=&quot;Verdana&quot; size=&quot;2&quot; color=&quot;#000000&gt;</font><br>

            <font color='#008000'><b>Also, you MUST use the American spelling of 

            color for the font tags</b></font></font></td>

        </tr>

        <tr>

            <td height='17' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#FF0000'>&nbsp;&lt;b&gt; Bold Text &lt;/b&gt;</font></td>

        </tr>

        <tr>

            <td height='18' width='473'>

            <p align='center'><font size='1' face='Verdana' color='#800000'>

            </font></td>

        </tr>



    </table>



    </div>



      </tr>



    </table>



    </body>



    </html>"
    ;

    }else{

    die (
    "Only certain admins can view this page");

    }

    ?>

    <?

    }else{

    die (
    "Only Admins Can View This Page");

    }

    ?>
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  2. #2
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Is there a row in that table?

  3. #3
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    Is there a row in that table?
    I dunno. You made the DJ Panel.
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  4. #4
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    Sorry for double post.
    Last edited by Lysine; 11-09-2006 at 10:50 PM.
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  5. #5
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    That might be why. Go into PHPMyAdmin and insert a blank row with the ID of 1 then go back to that page
    Last edited by Dentafrice1; 11-09-2006 at 11:03 PM.

  6. #6
    Join Date
    Sep 2006
    Location
    Nottingham
    Posts
    74
    Tokens
    0

    Default I need a Domain and Host

    I need a Domain and Host for my mate Im paying for him like :@ Lol Im looking for buy one for

    5 HC's - domain and host anybody intrested in selling me one?

  7. #7
    Join Date
    Jul 2006
    Posts
    202
    Tokens
    0

    Default

    Caribic you posted a reply, i think you were meant to make a topic
    Pssht

Posting Permissions

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