Jump to content

Query the DB for users ID?


ChrisMartino

Recommended Posts

This time i want to make a code so if somebody types "profile.php?member=123" it shows the members profile, This is how i show their own profile:

 

 

		if ($action == $Start) {
		?>
			<center>
				<img src="<?=$_SESSION['AccountPic']?>" width="130" height="130">
				<br />
				<a href="profile.php?change=pic">[Change Picture]</a>
				</center>
				<br />

				<?php
				echo "<b>Username:</b> $User";
				?>
				<br />
				<?php
				echo "<b>IP Address:</b> $AccountIP";
				?>
				<br />
				<?php
				echo "<b>Email Address:</b> $Email <a href=\"profile.php?change=email\">[Change]</a>";
				?>
				<br />
				<?php
				echo "<b>Account Type:</b> $AccTyp";
				?>
				<br />

		<?php
				if($AccountQurey == $Administrator)
				{
					echo "<b>Administrator:</b> Yes";
				}
				else
				{
					echo "<b>Administrator:</b> No";
				}


		}

 

And i want to make it so it shows those but for the members id that they put in the address bar, How can i do that?, Also how could i list all registered members usernames?

 

 

And the field that holds the members ID is "id" in the DB

 

Link to comment
https://forums.phpfreaks.com/topic/188705-query-the-db-for-users-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.