bradenkeithcom
01-05-2008, 11:45 PM
So I have two tables with in the database braden_gaming. One is for my shoutbox and one is for my Users... where people login, etc. Now on my shoutbox page I have the messages going to shoutbox database (as well as some other information). I'm wanting to get the "Author" to be the user's login username and to be automatically inserted without them typing it in or having the option to change it. Look below to see what I did.
<INPUT TYPE="hidden" NAME="author" value="<?php echo $username; ?>">
That's not a problem. The problem is instead of writing the name is rights, Resource #X, replace X with the number that corresponds to there signup order.
So where's my problem? This is how I'm calling the information from table "users"
$username = mysql_query("SELECT * FROM users WHERE username = '$username'") or die (mysql_error());
Please help in whatever way you can.
<INPUT TYPE="hidden" NAME="author" value="<?php echo $username; ?>">
That's not a problem. The problem is instead of writing the name is rights, Resource #X, replace X with the number that corresponds to there signup order.
So where's my problem? This is how I'm calling the information from table "users"
$username = mysql_query("SELECT * FROM users WHERE username = '$username'") or die (mysql_error());
Please help in whatever way you can.