Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    please help me it should only take a second

    ok i am new to this all and i am trying to make a regester script so they can just regester for my game before it opens all i need is a page were they insert the info and hit submit and it puts it into the database i already have a database made for it i just cant make the page if somebody could just really quick make it i would SOOOOOOO much appricate it

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Well what server-side language are you planning on doing this in? What data? Where is your form?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    sry

    sry bout that i should have explained better ok i would like to know if there is any way that some one could show me how to make a regester script in php launage
    PHP Code:
    <html>
    <head>
    </head> 

    <body bgcolor=#ffffff>
    <?
        
    if (isset($UserName) && isset($password) && isset($hometown) && isset($age) && isset($email) && isset($start_city)) {
        
    mysql_connect("localhost""*****""******"); 
            
    $query "INSERT INTO pregame VALUES ('$UserName','$password','$hometown','$age','$email','$start_city')";
            
    $result mysql_db_query("*****"$query); 

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

    <h1>regester</h1>
    <form>
    User Name: <input type=text name='UserName'><br>
    Password: <input type=text name='password'><br>
    Email: <input type=text name='email'><br>
    Hometown: <input type=text name='hometown'><br>
    Age: <input type=text name='age'><br>
    Starting City: <input type=text name='start_city'><br>

    <input type=submit>
    </form>

    <form name="form2" method="post" action="">
    </form>
    </body>
    </html>
    ok thats what i have so far and when i click submit it does not work and also on starting city these are the citys they are supposed to be able to chose from

    • Vancouver
      Atlanta
      Los_Angeles
      Washington
      New_York
      Las_Vegas
      New_Orleans
      Atlantic_City
      Honolulu
      Philadelphia


    i am just so lost i am not the programmer but he is out of town and is not around to do this and i have like no clue how and these people are starting to get mad at me because i promised that the game would be open soon like i said i have no clue how to do any of this please help me

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    No problem. Gimme a minute and i'll have it ready. Your main problem is the form itself. I'm also cleaning up some of the other code as well.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Ok here is the cleaned up working version:

    PHP Code:

    <html>
    <head>
    </head> 

    <body bgcolor=#ffffff>
    <?
        
    if(isset($UserName) && isset($password) && isset($hometown) && isset($age) && isset($email) && isset($start_city)) {
            
    $dbhandle = @mysql_connect("localhost""dbusername""dbpassword") or die("Unable to connect to database at this time");
            
    mysql_select_db("databasenamegoeshere"$dbhandle);    
            
    $query "INSERT INTO pregame VALUES  ('$UserName','$password','$hometown','$age','$email','$start_city')";
             if (
    mysql_query($query)){
                echo 
    "<p>$UserName was added to the database</p>";
            }
        }
    ?>

    <h1>regester</h1>
    <form method="post" action="<?=$PHP_SELF?>">
    User Name: <input type="text" name="UserName"><br>
    Password: <input type=text name="password"><br>
    Email: <input type="text" name="email"><br>
    Hometown: <input type="text" name="hometown"><br>
    Age: <input type="text" name="age"><br>
    Starting City: <input type="text" name="start_city"><br>

    <input type="submit">
    </form>


    </body>
    </html>
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #6
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help me again

    i did this EXACTLY as you said to but when i click submit all that happenes is this say i put the
    username as the69pimp and the
    password as mypassword
    email as blah@umm.com
    hometown as cleveland
    age as 22
    and start city as chiago
    this is what happens... is only changes the url like this:

    blahblah.com/prereg.php?
    UserName=the69pimp&
    password=mypassword&
    email=blah@umm.com&
    hometown=cleveland&
    age=22&
    start_city=chiago


    and is does not insert it into the db i wish some one could just throw me togeather a small table script to make the tables and a small script so they can fill in the info and have it so it actually works PLEASE awnser me back asap thanx
    Last edited by The69Pimp; 08-02-2002 at 08:49 AM.

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you absolutely positive that it's not inserting anything into the DB? Have you checked? It really should be
    Offtone.com - In the works...

  • #8
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts

    Re: help me again

    Originally posted by The69Pimp
    i did this EXACTLY as you said to but when i click submit all that happenes is this say i put the
    username as the69pimp and the
    password as mypassword
    email as blah@umm.com
    hometown as cleveland
    age as 22
    and start city as chiago
    this is what happens... is only changes the url like this:

    blahblah.com/prereg.php?
    UserName=the69pimp&
    password=mypassword&
    email=blah@umm.com&
    hometown=cleveland&
    age=22&
    start_city=chiago


    and is does not insert it into the db i wish some one could just throw me togeather a small table script to make the tables and a small script so they can fill in the info and have it so it actually works PLEASE awnser me back asap thanx

    What I posted works just fine. You said you already have the database set up. Did you not already create the table for it?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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