good evening everyone,

i'm new here on this site, and i was wondering if someone could help me out here. (Belgium guy--> bad english, sorry :o) )

i have to make a website, and it must contain a sort of forum.
A user has to register before logging in.

Then he gets a private inbox with a profile.
The meaning of this site is that he can post private messages to other users and public messages that everyone can read.
He can also search for profiles eg. : a woman for dating, age, city,...

Because i haven't got many experience with php and mysql, i thought if someone knows how i have to start with something like this, or if there is code on the net, not to use, but to see how it works?

Greetz,

Betacrash!

    Read these (login specifically):
    http://robouk.mchost.com/tuts/php.php

    Then you should be able to add stuff to the login/register and stuff.

    Forum tutorial (bad kind in my opinion - I don't like replies to replies 😛 but it should be easy to modify):
    http://php.resourceindex.com/Documentation/Examples_and_Tutorials/Bulletin_Board_Message_Systems/

    For PMs, just make a database table containing the fields: ID, author, message, title, date, and status.
    Status would be unread or read (highlight or change icon for unread).

    Then you should simply be able to display the PM box (after doing those tuts you should definately be able to do the db stuff), and if there are any unread messages display "You have 5 new messages" for example.

    Good luck.
    If you need more help I'll be happy to give it. 🙂

      Hey,

      waw, thx. I'm going to take a look at this right away!

      greetz,

      Betacrash

        do you have to code the forum, or just have it running successfully on your site? There are plenty of forums you could just download then configure on your server.

        Cgraz

          i think i have to explain the code on the presentation day, so i would be good to understand it.

          so i can download the code, but then i also have to understand it ;o)

          but i you know some site, you can allways post them so i can take a look at them.

            i don't know any links, but some that come to mind are phpBB, vBulletin (PHP Builders uses this one), and Wolflab.

            Cgraz

              www.phpbb.com

              That's really complex... I don't think that'd be a good idea lol. If you write it yourself then you should understand it. 🙂

              Do that login tutorial, then you'll have your login stuff and you should be able to modify it fairly easily.

              Do one of those forum tutorials.

              And for the PMs it should be really easy.
              Feel free to aks me anything. 🙂

              For the searching of the database for stuff, there's a tutorial on this site:
              http://www.spoono.com/tutorials/php/
              It's on the right somewhere.

              Good luck. 🙂

                hey,

                when i use sessions with this code, how do i have to send them with my url?

                session_register("username");
                session_register("password"); // register username and password as session variables.

                is is like this?

                header("Location:user.php?sessionusername=$username");

                or

                <a href="members.php?sessionusername=$username">You are logged in.</a>

                i think this is all wrong, but i don't know another way :os

                greetz,

                gert

                  Huh? What are you trying to do?
                  When the browser closes, the session is deleted - good security.
                  If you want to use the vars on other pages, you can just call the variable the same way as on the first page:
                  $_SESSION['var']

                  if(isset($_SESSION['var']))
                  {
                  // You are logged in.
                  }
                  else
                  {
                  // Not logged in.

                    ok, it works for now 😉

                    i have another problem :o$

                    when i want to register, i want that my code sends an email to the user who just registered.
                    i used this code, and he didn't give a fault, but he doesn't send the mail. Do i have to give it a propertie for the smtp server?

                    $header = "MIME-Version: 1.0\r\n";
                    $header .= "Content-Type: text/html; charset=iso-8859-1\r\n";
                    $header .= "From: $username<$email>\r\n";
                    $subject = "From: $forumTitle";
                    $body = "<font face=$fontFamily size=2><b>UserID :</b> " . $row['userid'] . "<br>";
                    $body .= "$username<br><br>";
                    $body .= "$password<br><br>";
                    $body .= "____________________________________________________________<br>";
                    @mail( $row['email'], $subject, $body, $header );

                    greetz,

                    betacrash

                      Write a Reply...