Hot to create a register and login page Dreamweaver cs3

Posted on 2009-04-29
Last Modified: 2012-05-06
Hi guys,

I'm very new to web design and am trying to find out how to create a page for people to login with a username and password, and if they don't have one there would be an option for them to register their details and get a username and password. I only the log in to apply to a couple of pages on the website.

They would then be able to access a contact info page, and a classified section, how would I direct them to these pages once they have logged in?

I am using Dreamweaver CS3 on a Mac and am looking for the easiest way possible to do this!

Any help would be greatly appreciated.

Thanks in advance
Question by:hobbittfeet
    LVL 3

    Accepted Solution


    You have a really good tutorial here:

    That one is simple and pedagogic.

    Hope this helps!

    Author Comment


    Sorry, I really am a novice at this.

    I have no idea how to create the database? I assume I can just copy and paste the text for the .php pages?


    LVL 3

    Assisted Solution

    Yeah, you can just copy and paste the code into the .php files. The script uppermost is a MySQL script (database) and it will create the table you will need in the databse.

    What you will need to do is to either run the script in PHPMyAdmin (easiest way) or make a MySQL connection in a separate .php file where you type this code:

    // File create_db.php
    $conn = mysql_connect('localhost', 'db_username', 'db_password') or die ('Cannot connect to server');
    mysql_select_db('db_name') or die ('Cannot open database');
    return $conn;
    $query = "CREATE TABLE `users` (
          `username` VARCHAR( 15 ) NOT NULL ,
          `password` VARCHAR( 15 ) NOT NULL ,
          `email` VARCHAR( 50 ) NOT NULL
    $result = mysql_query($query);

    Open in new window

    LVL 3

    Assisted Solution

    On line 4 you will have to find out your MySQL connection information. localhost is used in most cases, but it can also be an IP number or something, it differs from web host to web host. db_username and db_password is your login username and password that you received from the web host. And db_name is the name of the database.

    When you're done with that file, upload it to your web space and run it in the web browser. Example:

    After that, check if the table has been created in the database in PHPMyAdmin and if it has been created, remove the file create_db.php to ensure that it will not be executed again.

    Regards ~ Joel

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now