Page 1 of 1

MySQL and working with two tables

Posted: Sun Dec 24, 2006 7:47 pm
by tarja311
Hey guys,

I have a PHP script communicating to MySQL. Two tables are used and are set up as follows :

ID | User-ID

and

ID | Moderator


The first table is basically a logging table that logs incoming users by inserting the users id into the User-ID column. The second table is where the admins can set users to become moderators.

The way it is all laid out is like this : The admins have access to a user-management page where there is a hyper-link next to each user-id ( using the first table ) that says "Set as Moderator". When this link is clicked, it automatically sets that user as moderator by adding their user-id into the second table. Unfortunately i haven't gotten that far. I can't seem to get that user-id variable into the other table, just the index id ( 1, 2, 3 ... ect )

The "Set as Moderator" link looks like this :

Code: Select all

echo "<TD><A HREF = '?show=management&cmd=moderate&id=$id'>Set as Moderator</A>";
... where $id is the index id of that user.

Above that code is a :

Code: Select all

if(!isset($cmd))
{
and below is the empty execute command :

Code: Select all

if($cmd == "private")	
{	}
I hope i am making it clear enough to understand.

Thanks

-- tarja

Posted: Mon Dec 25, 2006 12:11 am
by tarja311
I resolved it.

Thanks. :)

Posted: Wed Dec 27, 2006 12:29 pm
by califdon
tarja311 wrote:I resolved it.

Thanks. :)
Glad you resolved it. Do us all a favor and go back to your original post and amend the Subject line to include the word RESOLVED or FIXED. That saves us time from trying to help you when you've already solved it. Thanks.