Making "profiles" apon "registering"

Status
Not open for further replies.

Benden

maging ang maganda mamatay
Jun 4, 2010
2,281
1,480
Alright, so I am trying to test my php skills by making a secret project and I need profiles made apon registering using the id

How do I do this

and the project isnt a usersystem
 

Mac

New Member
Feb 9, 2011
111
2
while hes registered his details are in mysql . you need only to make a profile.php

Here you go :
PHP:
<?php
$name = $_GET["name"]
$details = array();
$query = mysql_query("SELECT * FROM users WHERE username='".$_GET["name"]."'");
$query2 = mysql_query("SELECT * FROM users");
$rowshow = mysql_fetch_array($query);
$rowshow2 = mysql_fetch_array($query2);
if($_GET["name"]):
	if($_GET["name"] == $rowshow2["name"]):
		$details["name"] = $rowshow["username"];
		$details["age"] = $rowshow["age"];
		# You can add more details.
		echo "This person is named ".$details["name"];
		echo "This person is ".$details["age"]." years old.";
		# You can add more echos !
	else:
		echo "Name doesn't exist!";
	endif;
else:
	echo <<< END
	<form method='get'>
	Please select one person's name !
	<select name='name'>
	<option>{$rowshow2["name"]}</option>
	</select>
	</form>
END;
endif;
?>
 

Benden

maging ang maganda mamatay
Jun 4, 2010
2,281
1,480
Alright well im just trying to make a ebay type thing, I already have it so it shows up on the browsing page but how do i make it have its very own page but the link would be like localhost/ebay/viewad=ad-id

and this page would be created when you make the ad
 
Status
Not open for further replies.

Users who are viewing this thread

Top