[SOLVED] JUST A FEW SECONDS
Posted: Tue Jul 13, 2004 10:21 pm
Look at this:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in c:\apache\htdocs\userprofile.php on line 17
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in c:\apache\htdocs\userprofile.php on line 18
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in c:\apache\htdocs\userprofile.php on line 17
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in c:\apache\htdocs\userprofile.php on line 18
Code: Select all
<?php
<?
session_start();
include("database.php");
include("login.php");
verify();//function to check session
$query="SELECT * FROM employee WHERE username = $_SESSION[username]";
$result=mysql_query($query);
include ("head.html");
echo "<left><b>$_SESSION[username]</b> Profile Management:</b> You can edit some of your personal info here.";
$ID=mysql_result($result,"username");// HERE!! What should I put here
$Pass=mysql_result($result,"password");
?>
<hr>
<font color="#671247" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<center><b>*****************************************</b></font></center>
<hr>
<div align="center"><center>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<td align="left" valign="bottom" width="30%"
bgcolor="#FFFFFF" valign="TOP" marginwidth="12" marginheight="12">
<font color="#671247" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<b>Username</b></font>
</td>
<td align="left" valign="top" width="70%"
bgcolor="#FFFFFF" marginwidth="12" marginheight="12">
<font color="#671247" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<b><?echo "$ID";?></b></font>
</td>
</tr>
</table>
<div align="center"><center>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<td align="left" valign="bottom" width="30%"
bgcolor="#FFFFFF" valign="TOP" marginwidth="12" marginheight="12">
<font color="#671247" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<b>Password</b></font>
</td>
<td align="left" valign="top" width="70%"
bgcolor="#FFFFFF" marginwidth="12" marginheight="12">
<font color="#671247" size="3" face="Verdana, Arial, Helvetica, sans-serif">
<b><?echo "$Pass";?></b></font>
</td>
</tr>
</table>