Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 560
0 Users 6 Guests Online
Forum Index » PHP + MySQL » In need of some Tuts :D
Posted on Thursday 10th January 200 at 04:47 AM
-=InSaNe=-
templates/default/images/noavatar.png's Avatar
Junior Member
I have recently been working on a project, and need some tuts to finish up some stuff. The main thing I need is a tutorial on how to display the users pets, on there profile page. It would be nice to also battle other users within the usersystem, but meaby you have to have the other user online.

Another thing that I would like to see, is a Guestbook on each members profile. It would be nice if the user could edit/delete posts only on there own profile, but just a simple shoutbox on each profile page would work.

And last (for now), is just a place on everyones own page that shows the amount of money or points they have gotten, the items purchased from the store, and ALSO: I would really like to be able to show latest posts/topics created by a user. Or something on the lines of that.

If you need more info, just ask, thank you everyone!
Posted on Saturday 12th January 200 at 03:13 AM
Dean
templates/default/images/noavatar.png's Avatar
Active Member
Learn to code before making games you pathetic idiots
Posted on Saturday 12th January 200 at 04:49 PM
-=InSaNe=-
templates/default/images/noavatar.png's Avatar
Junior Member
Wow, someone is craby. It is not a game at all, but a website, not focused around the Pets at all. So meaby take a chill pill. I do not know how to make this kind of stuff, so help would be... helpfull.
Posted on Saturday 12th January 200 at 05:42 PM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
[quote=Dean]Learn to code before making games you pathetic idiots

Look whos talking eh? You can't code either so stfu.
Posted on Saturday 12th January 200 at 06:29 PM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
Sorry for double post and such But i have some codes.

On Members.php,
Find:
Code

$user = mysql_fetch_array($getuser);

Add After:
Code

$get_pets = mysql_query("SELECT * FROM `user_pet` WHERE `owner` = '$user[username]';");
$total_owned = mysql_num_rows($get_pets);


Then find
Code

Age: $user[age]

Add After
Code

Pets Owned: $total_owned<br />";

Also add a <br> after [age] so they aren't on one line ;)

Right going to have to do a bit of replacement:

so, replace
Code

</fieldset>";


With
Code

while($petarray = mysql_fetch_array($get_pets)){
print "Name: $petarray[pet_name]<br>
<img src=\"$petarray[image]\" alt=\"$petarray[pet_name]\"><br>
Level: $petarray[level]";
}
print "</fieldset>";