Re: [PHP] Writing my own web based user forum



If I fully understood the question you were asking then no.
Since it seems you are using a database there is no need to serialize.
You can write a simple function that fetches user data from a DB query
and then creates the object.
If you are going to use sessions you will have to do that only when
the user logs in and for verification purposes of whatever kind.
You might think of something similar to:
http://webbytedd.com/b1/simple-session/

In your original post you did not mention a "picture upload site" so I
suggest it is about uploading pictures to the forum/attaching them to
a thread.
I do not really have an idea of how your site will be operating, but I
guess you analyze the GET parameters and include files according to
them.
Some code might be helpful to explain what you want

On Fri, Aug 1, 2008 at 2:52 PM, Jason Pruim <japruim@xxxxxxxxxx> wrote:
So are you suggesting, create the users in the forum, and then just
serialize/unserialize when needed to store the info so when they go to the
picture upload side it queries the forum database?


On Aug 1, 2008, at 8:07 AM, Bernhard Kohl wrote:

<?php
#User authentication should not be a problem at all.
#If you want it simple just serialize a user class and write it to a
file or into a DB.

class user {
var $username;
var $pw;
function set_user($name, $pw) {
$this->pw = md5($pw);
$this->username = $name;
return true;
}
}

$new_user = new user();
if ($new_user->set_user('Joe', 'swordfish') {
$fp =@ fopen('/some_dir/users.txt', 'a');
@fwrite($fp, serialize($new_user));
@fclose($fp);
}

# the next time you need it simple read it in again with unserialize()

?>
On Fri, Aug 1, 2008 at 1:49 PM, Jason Pruim <japruim@xxxxxxxxxx> wrote:

Hi Everyone,

I am looking at writing my own web based user forum somewhat for my own
knowledge, and because I know that I don't know enough to be able to tie
in
authentication so they only need 1 user account.

Does anyone have any examples short of downloading something like phpbb
and
tearing it apart?

It will probably be really light weight, basic forum that hopefully will
expand into more as time goes on :)

I've tried searching the web but have not been able to turn up any help
unless I was to write a bridge for a song...

Any knowledge you can bestow upon me is greatly appreciated!

Thanks!


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@xxxxxxxxxx





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
japruim@xxxxxxxxxx





.



Relevant Pages

  • Re: Self-generating Number
    ... I built a database to track reprocessing of parts that were fixed ... We are required by instruction to serialize these parts ...
    (microsoft.public.access.queries)
  • Re: Whats a good database for a really simple app?
    ... you could also create the stuff as a object database and just serialize ... > if it's on disk at startup, create it if not, and serialize it as the ... > anyone needing even a two user app, but for a single user app it ...
    (microsoft.public.dotnet.languages.vb)
  • Serialization/Compression
    ... envisaged that we are going to run out of database space if more users start ... approach is when the user modifies the data. ... If the user has edited the data i will have to find out which chunk he ... serialize and compress only that portion of the data. ...
    (microsoft.public.dotnet.general)
  • Re: Serialization/Compression
    ... We are developing an application that allows users to take a snapshot of the some database tables and save them another set set of tables and work with them. ... To solve this problem i suggetsed to split the records that go into the model tables in chunks of say 5000,binary serialize the data, compress it and store the compressed form of the data in a blob field in the database. ... If the user has edited the data i will have to find out which chunk he has modified, serialize and compress only that portion of the data. ... I don't want to serialize all the chunks of data if the user just modifies only one chunk of the data. ...
    (microsoft.public.dotnet.general)