Username:
Password:
Remember me:
Register

Back to forum: Web Programming (HTML, JS, CSS, PHP, MySQL)


Search forums via Google


0 Users appreciate this thread.

Profiles?
Started by angelrulez7
(2012-05-27 05:19:19)
angelrulez7 (2012-05-27 05:19:19)
I need a profile script. Please help!
a
angelrulez7 (2012-05-27 16:53:40)
Actually, not really. Most all PHP MySQL codes I use work.
a
11Drago (2012-05-29 02:46:15)
It's not depending on the login script. I use $_GET['username'], this makes it easier to find a users's profile. It's basically
mysql_query("SELECT * FROM users WHERE username='".$_GET['username']."'";
Once you use that, then it's just styling and placing the mysql_fetch_array variable on the page.
angelrulez7 (2012-05-29 06:32:29)
Can you just create a .txt file for me with a full PHP code? D: I didn't get any of that!
a
angelrulez7 (2012-05-30 22:28:21)
I've tried my hardest. Now stop raging noobishly -firemad
a
BioMan8 (2012-06-01 03:03:13)
When I try learning PHP my brain shuts off. 0.0
pikarceus (2012-06-01 17:40:18)
I can't even begin to begin to understand PHP, lol. One day...
Robdeprop (2012-06-02 22:44:09)
If you know PHP well, you should easily create simple stuff like profiles.

Show PHP Code show
<?php
$dbhost = "localhost";
$dbuser = "database username here";
$dbpass = "database password here";
$db = "database name here";
$user = htmlentities($_GET['user']);
mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error());
mysql_select_db($db ) or die(mysql_error());
$select = mysql_query("SELECT about_me where username='$user'" ) or die(mysql_error());
if(mysql_num_rows($select) != 1)
{
mysql_close();
die("Username $user does not exist" );
}
$row = mysql_fetch_row($select);
$about_me = htmlentities(stripslashes($row[0]));
echo "About $user:<br>\n$about_me";
?>


This post has been edited one or more times, the last time was:
2012-06-02 22:46:45

10 Years 3DSPlaza!
angelrulez7 (2012-06-03 00:22:15)
Whoa. A code from Rob. Sure it will work.
a
BioMan8 (2012-06-03 01:05:16)
Rob has a pencil next to him, that's IMPOSSIBLE.
angelrulez7 (2012-06-04 03:56:30)
Forum mod icon. o3o -Bio
a
BioMan8 (2012-06-07 01:24:00)
Oh... :l
CoolApps (2012-06-18 17:24:48)
LOL, The name of it was: Profile script for n00b Angelrulez7

Newer account: NodePoint
angelrulez7 (2012-06-21 01:03:53)
Ok -firemade
a
 

Log in to submit a comment

This topic's ID: 17207

Back to forum: Web Programming (HTML, JS, CSS, PHP, MySQL)




Total registered users: 8321
New registered users today: 7
Newest registered user: ElegantVulpes

©  Copyright 2026 3DSPlaza. All Rights Reserved