If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

[RESOLVED] Display a single Row w/ php

... and what I need is a script that I can implement into my site
where when a logged in user goes to ../myacc.php the script will display
their user details that are in the database, and displays their row
according to a session that has their username which was set when they logged in.

First you need to add a new field to your users table called "username" which is typically different than their first and last name, otherwise how are you going to find the correct row in the database?

// If one row was found in the result set, username exists...if ($mysql_num_rows==1) {print "Welcome, {$data['fname']}{$data['lname']}, your E-Mail address is {$data['email']}";}// Otherwise...else {print "Sorry, the username $username was not found in our database...";}

Get the idea? Change the password and database stuff accordingly, and adjust the rest cosmetically as you see fit. On a side note I like to wrap {} around associative arrays in my source since it is syntaxically correct to use single quotes around key names, and avoid parsing errors. This method is much easier to write and read than: "blah".$data['keyname']."blah...";