Results 1 to 7 of 7

Thread: Article System

  1. #1
    Join Date
    Sep 2002
    Location
    az
    Posts
    168

    Article System

    Im gunn make this quick and to the point.
    I want to have a system where my staff can write reviews to a page called name_of_game.php and that page gets linked on this page www.flashstand.com/articles.php but im clueless on how to do this part, after writing toa flatfile, i need to access certain parts of it and put i on the Name_of_game.php and also how to make that file AND how to link to it. Thanks, Mike

  2. #2
    Use a database if you can. Not a flat file.
    www.atlanticrail.com

  3. #3
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    47
    For a start, Structure the system so authorized users can input reviews in mysql database then have articles.php pull it from the database.

    Im no guru, so I can't really help you much.
    Vinh,
    ShockHost - host me up scotty
    http://www.ShockHost.com
    (Coming soon to a world near you next month)

  4. #4
    Join Date
    Sep 2002
    Location
    az
    Posts
    168
    ok ill use mysql, i have a database set up, so how do i access it and wirte the html form varibles into it AND THEN access information from it to make the article?

  5. #5
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    47
    Im thinking your not too much of a backend man, I would say go to hotscripts.com and fetch yourself a script. I bet there are plenty to choose from then you could customise it to fit your needs.
    Vinh,
    ShockHost - host me up scotty
    http://www.ShockHost.com
    (Coming soon to a world near you next month)

  6. #6
    Join Date
    Sep 2002
    Location
    az
    Posts
    168
    well, i dont tink this is too hard to make, and i searched hotscripts and they dont have what i need, all i need is a simple tutorial on how to write html form information to the database and then pulll that information from somewhere else using php, any website i can gom to that will explain this?

  7. #7
    Join Date
    Sep 2002
    Location
    az
    Posts
    168
    Ok now, i basically have it,

    PHP Code:
    <?
    if (!$title || !$about || !$title || !$price)
    {
        echo 
    "You have not completed all of the required feilds in your article report.<br>"
    ."please go back and try again.";
        exit;
    }

    $title addslashes($title);
    $about addslashes($about);
    $screenshots addslashes($screenshots);
    $source addslashes($source);

    $db mysql_pconnect("localhost""mike""cool");
    if (!
    $db)
    }
        echo 
    "Could not connect to database.";
        exit;
    }
    mysql_select_db("news");
    $query "inert into articles values
        ('"
    .$title"', '".$about."', '".$screenshots"', '".$source."')";
    $result mysql_query($query);
    if (
    $result)
        echo 
    mysql_affected_rows()." Article insterted into database.";
    ?>
    The thing i need to do is, make a file named $title.php so people can actually go to it, but im unclear on how to do this, thanks for the help, mike

Posting Permissions

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