Web Analytics Made Easy -
StatCounter Help Me Please - CodingForum

Announcement

Collapse
No announcement yet.

Help Me Please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help Me Please

    i am starting a gaming website and i am having a bit of a problem with them here is my first pahe index.php
    PHP Code:
    <html>
    <head><title>Web Database Sample Index</title>
    </head> 

    <body bgcolor=#ffffff>
    <h1>Data from tabletest</h1>
    <?
        mysql_connect
    ("localhost""*****""*****");
        
    $query "SELECT GameName,
    Sub_date,
    Dev_email,
    Stage,
    Genre,
    Client,
    Platform,
    Interface,
    Multiplayer,
    Prizes,
    Last_reviewed,Cost,
    ESRBRating,
    Game_URL FROM gameform"
    ;
        
    $result mysql_db_query("*****"$query); 

        if (
    $result) {
            echo 
    "Found these entries in the database:<ul>";
            while (
    $r mysql_fetch_array($result)) {
                
    $GameName $r["Game Name"];
    $Sub_date $r["Submission Date"];
    $Dev_email $r["Developers Email"];
    $Stage $r["Development Stage"];
    $Genre $r["Game Genre"];
    $Client $r["Client"];
    $Platform $r["Platform"];
    $Interface $r["Interface"];
    $Multiplayer $r["Multiplayer"];
    $Prizes $r["Prizes"];
    $Last_reviewed $r["Last Reviewed"];
    $Cost $r["Game Cost"];
    $ESRBRating $r["ESRBRating"];
    $Game_URL $r["Game URL"];
                echo 
    "<li>$GameName
    $Sub_date
    $Dev_email
    $Stage$Genre
    $Client
    $Platform
    $Interface
    $Multiplayer
    $Prizes$Last_reviewed
    $Cost
    $ESRBRating
    $Game_URL";
            }
            echo 
    "</ul>";
        } else {
            echo 
    "No data.";
        }
        
    mysql_free_result($result);
    ?>

    <form name="form1" method="post" action="add_new_game.php">
      <input type="submit" name="Submit" value="Add A New Game">
    </form>
    <p>&nbsp; 
    </body>
    </html>
    The69Pimp
    New to the CF scene
    Last edited by The69Pimp; Jul 1, 2002, 03:42 PM.

  • #2
    and.....

    here is the second page were they fillin the game info
    PHP Code:
    <html>
    <head><title>Submitting New Game</title>
    </head> 

    <body bgcolor=#ffffff>
    <?
        
    if (isset($GameName
    && isset(
    $Sub_date
    && isset(
    $Dev_email
    && isset(
    $Stage
    && isset(
    $Genre
    && isset(
    $Client
    && isset(
    $Platform
    && isset(
    $Interface
    && isset(
    $Multiplayer
    && isset(
    $Prizes
    && isset(
    $Last_reviewed
    && isset(
    $Cost
    && isset(
    $ESRBRating
    && isset(
    $Game_URL)) {
        
    mysql_connect("localhost""*****""*****"); 
            
    $query "INSERT INTO gameform VALUES 
    ('
    $GameName',
    '
    $Sub_date',
    '
    $Dev_email',
    '
    $Stage',
    '
    $Genre',
    '
    $Client',
    '
    $Platform',
    '
    $Interface',
    '
    $Multiplayer',
    '
    $Prizes',
    '
    $Last_reviewed',
    '
    $Cost',
    '
    $ESRBRating',
    '
    $Game_URL')";
            
    $result mysql_db_query("*****"$query); 

        if (
    $result) {
            echo 
    "<p>$name was added to the database</p>";
        }
    }
    ?>

    <h1>Add an entry</h1>
    <form>
    Game Name: <input type=text name='GameName'><br>
    Submission Date: <input type=text name='Sub_date'><br>
    Developers Email: <input type=text name='Dev_email'><br>
    Development Stage: <input type=text name='Stage'><br>
    Game Genre: <input type=text name='Genre'><br>
    Client Type: <input type=text name='Client'><br>
    Platform: <input type=text name='Platform'><br>
    Interface: <input type=text name='Interface'><br>
    Multiplayer: <input type=text name='Multiplayer'><br>
    Prizes: <input type=text name='Prizes'><br>
    Last Reviewed: <input type=text name='Last_reviewed'><br>
    Cost: <input type=text name='Cost'><br>
    ESRBRating: <input type=text name='ESRBRating'><br>
    Game URL: <input type=text name='Game_URL'><br>
    <input type=submit>
    </form>

    <form name="form2" method="post" action="index.php">
      <input type="submit" name="Submit" value="Return To Index">
    </form>
    </body>
    </html>
    and all it does when i click submit is it puts the info into the address bar please help me
    The69Pimp
    New to the CF scene
    Last edited by The69Pimp; Jul 1, 2002, 03:46 PM.

    Comment


    • #3
      Which submit button?
      Spookster
      CodingForum Supreme Overlord
      All Hail Spookster

      Comment


      • #4
        the submit button after i fill in the info for the game

        Comment


        • #5
          This submit button?

          <input type="submit" name="Submit" value="Add A New Game">
          Spookster
          CodingForum Supreme Overlord
          All Hail Spookster

          Comment


          • #6
            no the submit button got left out i belive the submit button it but here it is

            PHP Code:
            <input type=submit
            that is in there i am new to php and mysql so i have no clue what to do to get it working

            Comment


            • #7
              Its because you haven't specified a form method. change

              <form>

              to

              <form name="form" method="post" action="wherever.php">

              Jee
              Jeewhizz - MySQL Moderator
              http://www.sitehq.co.uk
              PHP and MySQL Hosting

              Comment

              Working...
              X