Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2007
    Posts
    28

    Unanswered: Help Needed in creating database and php connection!

    Hello,
    I need help, it is related to mysql and php both.

    Ok i need to create a database in which somebody could enter his/her details using PHP Form. In the php form there will be more than 5 fields..like

    Name:
    Address:
    Telephone:
    Your Pay:
    Your Experience:

    Ok now i want it to connect to mysql server and all this info should be added in mysql tables when somebody clicks submit button and then i want all the info to be displayed on a page..like somebody enters his/her info using that form, it should be automatically appear in other page...obviously that page will be a PHP and will ues mySQL connect script.

    Please can anybody generate a code for me. help would be appreciated.

  2. #2
    Join Date
    Mar 2007
    Posts
    28

    MYSQL and PHP Connection..Database Helpppp

    Hello,
    I need help, it is related to mysql and php both.

    Ok i need to create a database in which somebody could enter his/her details using PHP Form. In the php form there will be more than 5 fields..like

    Name:
    Address:
    Telephone:
    Your Pay:
    Your Experience:

    Ok now i want it to connect to mysql server and all this info should be added in mysql tables when somebody clicks submit button and then i want all the info to be displayed on a page..like somebody enters his/her info using that form, it should be automatically appear in other page...obviously that page will be a PHP and will ues mySQL connect script.

    Please can anybody generate a code for me. help would be appreciated.

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have a look at the php.net site
    depending on what version of MySQL & PHP you are using you may need to look at either the Mysql functions (mysql_connect, mysql_select_db & mysql_query) or the newer class mysqli

    If you want some assistance then by all means ask, but I think you need to demonstrate some effort. Most people on this site are happy to assist, they generally wont do the whole thing for you, unless its a particularly interesting problem
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Mar 2007
    Posts
    28
    Thanks, I'll try to do it and let you know!

  5. #5
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    As a sample table structure I have this for you :

    CREATE TABLE people (
    Name VARCHAR(50) NOT NULL,
    Address VARCHAR(255) NOT NULL,
    Telephone VARCHAR(15) NULL,
    Your_Pay INT NULL,
    Your_Experience VARCHAR(255) NULL,
    INDEX(Name), INDEX(Your_Pay)
    ) ENGINE=InnoDB;

    The first two fields are required and the rest are optional. I can't remember if that is the right syntax for indexes so you might get a failure based on those when creating the table.

    n.b we don't know if the "Your_Pay" field is per annum, per month, per week, per day. Defining this may help you understand your data better

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by aschk
    n.b we don't know if the "Your_Pay" field is per annum, per month, per week, per day. Defining this may help you understand your data better

    ...has it?
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    PHP MySQL Resource
    Pretty much everything you'll need will be on w3schools.com, anything else, ask around here (I guess!)
    George
    Home | Blog

  8. #8
    Join Date
    Mar 2007
    Posts
    28
    hey thanks, lol i did manage to produce something...thanks guys

  9. #9
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Glad to hear it
    Would you mind posting your solution for the benefit of others who may have the same problem in the future.
    Ta!
    George
    Home | Blog

Posting Permissions

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