SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What I Am Working On (php/mySQL)

    I'm building a Staff Control Panel, an Advice Database, and a News Database.

    Here's what I think would be a good layout for the News Database (the advice database is the last thing I'm going to do).

    create table news
    ( postid int not null auto_increment primary key,
    subject char(30) not null,
    postdate date not null,
    poster char(30) not null,
    avatar_url varchar(200) not null,
    body mediumtext not null,
    )

    I havent created the table yet, nor do I know for sure if this will work.

    I am very new to php/mySQL so be nice

  2. #2
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this a good script for the staff control panel?

    PHP Code:
    <?php
      
    if(!isset($username)&&!isset($password))
      {
    ?>
      //Login Form (HTML)
    <?php
      
    }
      elseif(
    $name == "<username>"&&$password == "<password>")
      {
         
    //Staff Control Panel
      
    }
      else
      {
         echo 
    "Username and/or password are not correct.";
         echo 
    "<br>";
         echo 
    "Please go back and try again.";
      }
    ?>
    I do realize that this login script is based on 1 user's name and password. I'm not sure about how to make it query the database for name and password then verify that and stuff, but I am working on it.
    Last edited by Orion; Jan 15, 2002 at 18:06.

  3. #3
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Probably the best thing, remembering my own experiences starting, is not to worry too much right now - try things and see how they work (it's the mistakes you learn from I guess).

    For the user authentication, that article by Kevin is a really good place to start; http://www.webmasterbase.com/article/319

    One thing I notice on you news table. You're going to insert the poster as a string (their userid I guess?). You may find it easier to insert the identifying primary key from your users table (specially if users are able to change their userid).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •