Hi
Here's what I'm trying to do:
I help administrate a private forum. I want to include a member's posting name on a page that isn't part of the forum, but a page where they need to submit information. I would like to have their member ID automatically placed into a form.
I should add that the form's attributes are on the index.php page where the code will eventually go, but I would also need the name placed on an included HTML file called upon by the index.php page.
The cookie reading works good, except the cookie gives a member ID number instead of the member's name.
I sucessfully queried the MySQL database where the ID numbers and Member names are located.
So how would I go about scripting a variable that holds the member's name?
Here's the code I used to query the database:
$user = $HTTP_COOKIE_VARS["member_id"];
$linkID = @mysql_connect ("localhost", "root", "password");
mysql_select_db("new-board", $linkID);
$member_id = mysql_query("SELECT id, name FROM ibf_members", $linkID);