Page 1 of 1

Lots of questions. :-)

Posted: Thu Jul 31, 2003 12:52 pm
by nick2
OK I got Registering, Logging in, set cookies.. and each page is protected by cookies.. ok now its time for messaging system, users online, and Members page. :(

I've been posting alot of threads because of this script i'm making ^_^

Ok well I have some question I hope you might be able to answer:

1: Messaging system, How. Do I use a database to store the messages? - if so How do I know what user to send to? I do have a ID stored in database. :/

2: Members page, anyone know how to list certain database tables on a page?

3: Members online, when you login should I make it send your id to a text file then echo that text file on the main page? and when you logout it deletes your id? I dunno help please!

I know this is alot but it would be appreciated greatly!

I basicly need guidlines!

Thanks again,
Nick

Posted: Thu Jul 31, 2003 6:04 pm
by nick2
not one of you can give me some tips? :(


please! 8O

Posted: Thu Jul 31, 2003 7:58 pm
by mikusan
You are looking too far ahead of yourself...take a book read the basics... take an opensource project see how they do it... then look into sessions, and in time you will find the answers to your questions... what you asked is what people have learned with months of practice and head bangings over the desk...i've been through that...

It gets easier one you get through the basics...

Re: Lots of questions. :-)

Posted: Thu Jul 31, 2003 9:21 pm
by McGruff
nick2 wrote:2: Members page, anyone know how to list certain database tables on a page?

Code: Select all

<?php
$mysql = "SELECT name FROM members ORDER BY name";
$query = mysql_query($mysql) or die(mysql_error() . '<br />');

// $query is a result resource. Mysql_fetch functions fetch an array of values one row at a time. If you have multiple rows, use a while loop:

while($result = mysql_fetch_array($query))
{
    $name = stripslashes($result['name']);
    echo $name . '<br />';
}

?>

Posted: Fri Aug 01, 2003 2:19 am
by Caped Knight
Get PHP & MySQL for Dummies.

Posted: Sat Aug 02, 2003 11:09 pm
by jmarcv
McGruff,
I think he meant
$mysql = "SHOW TABLES from myDataBase";

>3: Members online, when you login should I make it send your id to a text file then echo that text file on the main page? and when you logout it deletes your id? I dunno help please!

How about you just echo the id?