I need someone's help!, pretty badly!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamesxg1
Forum Newbie
Posts: 3
Joined: Tue Jan 20, 2009 10:48 am

I need someone's help!, pretty badly!

Post by jamesxg1 »

Hiya,

I am making a social network site and i need to make a profile.php where people can view there friends profile but i dont know how to get there id, Eg. Bob goes on Sammy's profile and view's Sammy's information, But i dont know how to do this i only know how to let the users view them selves, i will post a SQL dump and all the vars that are usable, So can someone please make a link or two for me that will get the info please, Thanks guy's.

SQL Dump:

Code: Select all

-- phpMyAdmin SQL Dump
-- version 2.11.9.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 25, 2009 at 02:44 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.6
 
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
 
--
-- Database: `share`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `users`
--
 
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(6) NOT NULL,
  `username` varchar(30) collate latin1_general_ci NOT NULL default '',
  `email` varchar(255) collate latin1_general_ci NOT NULL default '',
  `firstname` varchar(20) collate latin1_general_ci NOT NULL,
  `lastname` varchar(20) collate latin1_general_ci NOT NULL,
  `password` varchar(255) collate latin1_general_ci NOT NULL default '',
  `gender` varchar(20) collate latin1_general_ci NOT NULL default '',
  `dobMonth` varchar(20) collate latin1_general_ci NOT NULL default '',
  `dobDay` varchar(20) collate latin1_general_ci NOT NULL default '',
  `dobYear` varchar(20) collate latin1_general_ci NOT NULL default '',
  `languages` varchar(20) collate latin1_general_ci NOT NULL default '',
  `groupid` char(1) collate latin1_general_ci NOT NULL default 'P',
  `photo` varchar(20) collate latin1_general_ci NOT NULL default '',
  `pm_count` int(11) NOT NULL,
  PRIMARY KEY  (`username`),
  UNIQUE KEY `id` (`id`,`username`,`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 
--
-- Dumping data for table `users`
--
 
INSERT INTO `users` (`id`, `username`, `email`, `firstname`, `lastname`, `password`, `gender`, `dobMonth`, `dobDay`, `dobYear`, `languages`, `groupid`, `photo`, `pm_count`) VALUES
(1, 'jamesxg1', 'softwarespin@hotmail.co.uk', 'James', 'Gregory', 'b464ca3afbeffd6e22fbc84e959fe204', 'Male', 'January', '02', '1994', 'Array', 'A', '', 0);
 
Vars:

Code: Select all

$username, $id, $firstname
Thanks

James.
Deuce
Forum Newbie
Posts: 12
Joined: Sun Jan 25, 2009 5:23 pm

Re: I need someone's help!, pretty badly!

Post by Deuce »

I'm not at all trying to be mean, but if you are unable to do this, don't you think you might be biting off more than you can chew trying to build a social networking site?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Friends List Query

Post by John Cartwright »

How are you storing the association between a person and his friends?

And in the future, please choose a more descriptive title. Refrain at all costs from using words such as "help!". I've since renamed it for you.
Post Reply