TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-19-2009, 05:13 AM   #1 (permalink)
The Wanderer
 
Join Date: Apr 2009
Posts: 19
Thanks: 9
shankar is on a distinguished road
Default Whats the error?

<?php

session_start();

$username=$_SESSION['username'];
$fname;
$lname;
$guardian;
$connect = mysql_connect("localhost","root","") or die ("Couldn't connect");
mysql_select_db("school_inspirations") or die("Couldn't find db");

$fname = mysql_query("SELECT fname FROM student_reg WHERE username='$username'");
mysql_query($fname);


$guardian = mysql_query("SELECT guardian FROM student_reg WHERE username='$username'");
mysql_query($guardian);


?>

<table border=1px;>

<tr>
<td>
Fullname
</td>
<td>
<?php echo "$fname"; ?>
</td>
</tr>

</table>




The ouput in the table is
Resource id #3
__________________
--
Regards
Shankar
shankar is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error handling Ross TalkPHP Developer Team 0 01-17-2009 10:27 PM
Can't solve browser error Peuplarchie Absolute Beginners 1 06-09-2008 05:48 AM
Keep getting mySQL error No. 1064, but i can't seem to find the problem Durux MySQL & Databases 8 04-13-2008 07:51 PM
an error makes me crazy nuts !!!!!!! webtuto Absolute Beginners 1 02-27-2008 10:31 AM
HTTP 500 error... kunoSTAR Absolute Beginners 15 08-05-2005 08:13 PM


All times are GMT. The time now is 02:27 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design