Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 1, 2026.

Need some help on php script

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Camron

VIP Member
Impact
44
Hello everyone. I am currently in progress in making a "myspace" type script. The site is www.profiledash.com. The user sign's up, gets a profile.

This is the problem I am having.
As I am not "super" at php yet, what I have made only allows the memeber to see his own profile. I want it to show /viewprofile.php?id=thereusername so it will show there profile. Otherwise no one could see it. Then I would use mod_rewrite to make /them/. Unfortunately without viewprofile.php script, I am unable to go any further with this script.

If someone would be willing to help me, I know it couldn't be to hard just to make this for me. I would give you access to the site so that you would be able to look at the functions and vars to create the viewprofile.

Please contact me via msn> [email protected]. We can chat further in there. I will now be in Namepros live chat to see if someone can help me there :)

Thanks again guys,
Camron
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
i think you need something like:
PHP:
$_GET
Hope that helps, im at the same level of php as you then.
 
0
•••
PHP:
<?
$profile=$_GET['id'];

/*
 insert mysql connect statement to connect to database
	then your mysql query would look something like:
*/
$result = mysql_query("select * from users where profile_id='".$profile."'");
?>
 
0
•••
crunch said:
PHP:
<?
$profile=$_GET['id'];

/*
 insert mysql connect statement to connect to database
	then your mysql query would look something like:
*/
$result = mysql_query("select * from users where profile_id='".$profile."'");
?>

That is on the lines of what you need.

If you wish to then show information for the user do something like

This below means grab the information from $result and put it into $user_info
PHP:
$user_info = mysql_fetch_array($result);

You may then do things like $user_info['name'] depending on what you have in your database.

A note: when you wish to get something from the url use $_GET, this will get something from the url that you specify for example an url like viewprofile.php?id=72 it would be $_GET['id']. Also you should use numbers not names for an id.

Need anything else don't be afraid to ask :)
 
Last edited:
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back