Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member ThePhoenix2006's Avatar
    Join Date
    Mar 2005
    Location
    Michigan
    Posts
    88
    Member #
    9431
    Hey Everyone,

    I have been trying to get PHP to work on a website I am trying to build. I am currently reading "PHP and mySQL For Dummies"...yes I will admit it I am a dummy.

    I made a artist table under my database MemberDirectory

    I made the following columns:
    loginName
    creatDate
    password
    bandName
    email
    members
    about
    website
    phone
    state
    city
    zip
    genre1
    genre2


    Now..my question is how do I get new user to register properly and then upload the new info to this database. Then when they are registered they would be able to login and see the info they have or change it. Could I use a form text field and name it a variable then do it that way?

    I hope someone can help me I have been beating my head against the wall all week. :ichatcry:

    THANKS FOR READING!
    "Make sure the juice is worth the squeeze" ~The Girl Next Door

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Quote Originally Posted by ThePhoenix2006
    He

    Now..my question is how do I get new user to register properly and then upload the new info to this database.
    Well, you would create a web page with a form on it. This form would have text boxes/radio buttons/form elements for all the information you need. You should name these how you named your database columns, just to make it easier.

    Then, depending on how you setup your <form> tag, you will either need to use the $_POST array or the $_GET array.

    I am assuming you are using the $_POST method (eg <form method="post" action="..">.

    On the php page that does the inserting into the database, you would assign a php variable to the value of a form element. For instance, if you have a textbox called username, setting a variable would be as easy as...

    PHP Code:
    <?php
       $user 
    $_POST['username'];
    ?>
    You would have to do that fir all the values you want to insert.

    Once you have done that, you would do the INSERT command, which will insert these variables.

    I hope this gets you on your way, your post asked for a mix of information, so if you need more specific help, just reply and I will try my best.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com