Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MySql Fields

Options
  • 15-01-2008 1:38pm
    #1
    Registered Users Posts: 314 ✭✭


    Hi I was just wondering what part of the code will be used for naming a field when making the SQL database?

    <tr>
    <td>First Name:</td>
    <td><input name="first name" id="first name" size="40" /></td>
    </tr>

    Is it by any chance id?

    I'm making a form that when the user inputs their information it will send to the MySql database.

    thanks for any help.


Comments

  • Closed Accounts Posts: 583 ✭✭✭monkey tennis


    It entirely depends on the backend script/program, but it would be common to use the input 'name' field to name the database field. The 'id' field is used for CSS, I don't think it has any bearing on form input.

    The only way to know for sure which field the input is entered into is to inspect the backend code.


  • Registered Users Posts: 1,127 ✭✭✭smcelhinney


    Its the "name" attribute thats added to request headers when passing to backend code (for most programming languages). Think client-side scripting is the only language that can take id attributes? Correct me if Im wrong.

    As good programming practice, you should probably call these the same thing anyway, cant see any reason why you wouldnt?


Advertisement