PDA

View Full Version : PHP Help



Lysine
11-09-2006, 10:39 PM
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 ;
<? 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");

}

?>

Dentafrice1
11-09-2006, 10:42 PM
Is there a row in that table?

Lysine
11-09-2006, 10:48 PM
Is there a row in that table?

I dunno. You made the DJ Panel.

Lysine
11-09-2006, 10:50 PM
Sorry for double post.

Dentafrice1
11-09-2006, 10:51 PM
That might be why. Go into PHPMyAdmin and insert a blank row with the ID of 1 then go back to that page

Caribic
12-09-2006, 01:20 AM
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?

Motion
12-09-2006, 06:26 AM
Caribic you posted a reply, i think you were meant to make a topic ;)

Want to hide these adverts? Register an account for free!