Building a PHP website

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nomad
    Recognized Expert Contributor
    • Mar 2007
    • 664

    Building a PHP website

    Hello Everyone:
    I might need your help in the coming months.
    I will be helping build a website for a on-line School written in PHP, SQL, HTML, XML and flash
    I know some PHP and SQL enough to get into trouble.
    What I'm looking for is how to or templates on how to design the following.
    Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
    My Account info- shows Member ID, Password, couse took/taken currently, test scores....
    Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
    Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)

    Any leads or ideals would be great.
    thanks
    nomad
  • Nadeem0319
    New Member
    • Feb 2008
    • 5

    #2
    Originally posted by nomad
    Hello Everyone:
    I might need your help in the coming months.
    I will be helping build a website for a on-line School written in PHP, SQL, HTML, XML and flash
    I know some PHP and SQL enough to get into trouble.
    What I'm looking for is how to or templates on how to design the following.
    Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
    My Account info- shows Member ID, Password, couse took/taken currently, test scores....
    Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
    Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)

    Any leads or ideals would be great.
    thanks
    nomad
    for he register form you basicall got to just create a form in html:
    ex:
    Code:
    <form action="" method="POST">
    <input name="username" size="15" />
    <input type="password" name="password" size="8" />
    <input type="submit" name="login" value="Login" />
    </form>
    Like that and the PHP part would be something like:

    [PHP]
    <?php
    if( isset($_POST['login']) ){

    // Check if they entered anything in the inputs
    if (!$_POST["username"] || !$_POST["password"]) {
    die("You need to provide a username and password.");
    }

    // Create query
    $sql0 = "SELECT * FROM `members` "
    ."WHERE `username`='".$ _POST["username"]."' "
    ."AND `password`='".$ _POST["password"]."' "
    ."LIMIT 1";
    // Run query
    $sql = mysql_query($sq l0);

    if ( $create = @mysql_fetch_ob ject($sql) ) {
    // Login was successful, create the session variables
    $_SESSION["uid"] = $create->id;
    $_SESSION["uname"] = $_POST["username"];
    $_SESSION["utime"] = time();

    // Redirect to member page
    header("Locatio n: memberspage.php ");

    } else{
    // Login has failed
    die("Login was unsuccessful, Wrong login information.");
    }

    }
    ?>
    [/PHP]

    And for all the member pages you can put this in the header:

    [PHP]
    if (!$_SESSION["uid"])
    {
    // User not logged in, redirect to login page
    header("Locatio n: login.php");
    }
    [/PHP]

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      Nadeem0319:
      Thanks for the help...
      The hard part for me will be:
      1. recording the course, test scores into the clients account.
      2. payments for Downloading material and tests
      3. admin maintenance ie keeping the website up and running.
      keeping track of the clients. ie like a blog site where the admin can see whos on line and has the ability to change info, delete info on clients.

      thanks
      nomad
      PS Was wondering if any of you are familiar with ZenCart would like to use that ideal of a website.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by Nadeem0319
        <snipped>
        Almost everybody here can build a website for a price!

        Paramount is that this is a website where members help each other with questions or problems. I am sure most of them can work 'for a price', but that is not the reason for tem to help in this forum.

        Ronald

        Comment

        • peeHpee
          New Member
          • Feb 2008
          • 5

          #5
          Nomad,
          Recording the test scores and writing the data into the DB shouldn't be that hard. You should probably get used to session variables if you aren't already and if you are planning to have tests soread out across multiple pages.

          You can get a developers account from Authorize.net at no charge and they will provide a sample script(s) to show you how to connect to their server to process payments, it's not very hard but it's nice when you have a developers account where you can learn without any worries. Also, Authorize.net has a great recurring billing feature for subscriptions if they are important for your site.

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Nadeem0319, please note that the only type of advertising we allow on this site is the advertising of jobs and the advertising of services. However both of these types of adverts MUST appear in our Jobs forum which has guidelines covering post there.

            Please do not advertise you services in this manor again, it may lead to a site ban.

            Banfa
            Administrator

            Comment

            • harshmaul
              Recognized Expert Contributor
              • Jul 2007
              • 490

              #7
              Originally posted by nomad
              Register forum: Client fill in their personal info. once complete sends a comfirmation by email.
              My Account info- shows Member ID, Password, couse took/taken currently, test scores....
              Test Completion page: interactive test (will be written mostly in XML and Flash) need to some how transfer test results to db. if pass prints out certficate. Show all test results.
              Course Catalog; Subject, title of book, movie, download info, sign up for course, who taking what couse. payment (paypal)
              Hi,
              We'll go through this step by step.

              First off you will need a decently normalised table structure. Normalising is different for everybody. but what i would do is this....

              Code:
              tblMembers
              MemberID
              UserName
              Password
              etc.....

              Code:
              tblCourses
              CourseID
              CourseName
              etc.....

              Code:
              tblTests
              TestID
              TestName
              Once this is done, you will need a few tables to link them all together.
              Each member can have many courses in their catalog, so a many to many relation ship.....

              Code:
              tblMembersLinkToCourses
              MembersLinkToCoursesID
              MemberID
              CourseID
              Like wise, each member can take many tests.....

              Code:
              tblMembersLinkToTests
              MembersLinkToTestID
              MemberID
              TestID
              Once this is done, i would fill out the tables Courses and Tests (manually).

              BTW, i;m sorry if this bit was too basic, and if its too advanced let me know.

              Once this is done you will need to implement and interface.
              My rule of thumb is at least one interface per table.. we have 5 tables so will need at least 5 interfaces. So rather than me writing a "blog" on the problem make the tables, and possibly give us the table structure and we can start helping you make the UI!

              :)

              incase i don't help nomore (cos i'm quite crap) good luck, and i hope i will help more soon!

              Comment

              • nomad
                Recognized Expert Contributor
                • Mar 2007
                • 664

                #8
                Hello Everyone;
                Thanks for the help so far. I'm reading some info on some websites and a book on php and MYSQL as well.
                Will get back to you if I need more help
                You guys and gals are great.

                nomad

                Comment

                • harshmaul
                  Recognized Expert Contributor
                  • Jul 2007
                  • 490

                  #9
                  Hi,
                  Completely off topic, but my girlfriend laughs like mutley (in your avatar). I mean properly, its well funny.

                  Comment

                  • nomad
                    Recognized Expert Contributor
                    • Mar 2007
                    • 664

                    #10
                    Originally posted by harshmaul
                    Hi,
                    Completely off topic, but my girlfriend laughs like mutley (in your avatar). I mean properly, its well funny.
                    I love that comic when I was a kid. That one reason I chose that avatar because of his laugh...

                    nomad

                    Comment

                    Working...