Grow your CSS skills. Land your dream job.

Adding a registration form to WordPress page

  • # July 12, 2009 at 4:07 pm

    I’m trying to password protect some WordPress pages without using a plugin. I wrote a few pages in PHP make a simple user login/registration form. Just to make sure it worked, I threw it up on the web http://mbh.fivepotato.com/test/index.php . It is made up of 6 files: index.php, login.php, registration.php, activate.php, member.php, and logout.php

    Now I want to incorporate that form into a page on my WordPress site called "login". The member.php file is protected using the code:

    Code:
    session_start();

    if($_SESSION[‘username’])

    echo “Welcome, “.$_SESSION[‘username’].”!
    Logout“;

    else
    die(“You must be logged in!”);

    I was hoping that I could use some conditional statements and the "session_start(); if($SESSION)" hook to protect the pages I only want available to members who register through that form. Unfortunately I haven’t had any success. Does anyone have suggestions for how I could go about this?

    # July 13, 2009 at 2:34 am

    Moved topic to CMS help

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".