#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Need help with this php sharing links


    QUESTION 1
    Create a basic system for sharing useful links. Any user can view these links, though users have to be given access to post links. Trusted users may be given permission to delete links as well.
    At minimum, your site must have the following components:

    Configuration File (config.inc.php)
    This file (which will be include()d on all pages that require database connectivity) simply declares an array in the following format: $config['db'] The database to connect to $config['user'] Database username $config['pass'] Database password
    You should be able to substitute your own config.inc.php to connect to your test database.

    Installer (install.php)
    The installer is just a simple script that creates any database tables necessary, along with a default user account with administrative privileges. The default username and password should both be 'admin,' and should have all permissions.
    New users will be added to the database manually, there is no need to develop a Web front-end for managing users.

    Login (login.php)
    If a user is not logged in, they should be presented with a login form. If a user is logged in, they should be redirected to index.php.

    Main Page (index.php) List/Delete Links
    Print a neatly formatted list of all of the links posted to the site, and all relevant information (see below). A login link should be printed if the user is not logged in, and a logout button should be printed otherwise.
    Users with permission to delete links should be able to do so from this page, using a specific link or button for each link. Users with permission to add new links should see a link to do so. Note: These are two separate permissions.

    Create Link (create.php)
    Users with permission to add new links will be presented with a form to do so. Users without permission will be taken back to the main page.
    The create link form must have the following fields for information associated with it:
    The title of the link
    A brief description of the link
    The actual (valid) URL

    When stored, the following must also be assigned to each link:
    A unique identifier for each link
    The time the link was posted.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    194
    Rep Power
    76
    What's your question and we don't do your homework for you
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Re:


    Originally Posted by jack13580
    What's your question and we don't do your homework for you

    Sorry it's not a homework. i'm improving my php. Correction, the question are :

    (1)Main Page (index.php) List/Delete Links
    Print a neatly formatted list of all of the links posted to the site, and all relevant information (see below). A login link should be printed if the user is not logged in, and a logout button should be printed otherwise.
    Users with permission to delete links should be able to do so from this page, using a specific link or button for each link. Users with permission to add new links should see a link to do so. Note: These are two separate permissions.

    (2)Create Link (create.php)
    Users with permission to add new links will be presented with a form to do so. Users without permission will be taken back to the main page.
    The create link form must have the following fields for information associated with it:
    The title of the link
    A brief description of the link
    The actual (valid) URL
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    194
    Rep Power
    76
    What EXACTLY do you need help with? Unless you tell us what you need help with we can't help you

    That still looks like its an assignment
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by jack13580
    What EXACTLY do you need help with? Unless you tell us what you need help with we can't help you

    That still looks like its an assignment
    OK, the question is :
    user has to login to update new links or to delete links. but it must come with separate permission. how to create a link/button for user to login to go to "add new link" form and another link/button for user to login to go to "delete link" form in one page?

IMN logo majestic logo threadwatch logo seochat tools logo