need phpmyadmin enter data help

Code junkies hangout here

Moderators: ChriThor, LXF moderators

need phpmyadmin enter data help

Postby rcayea » Sat Aug 13, 2011 3:41 pm

Hi everyone,

I have a select-and-go list as part of my order form. Here is the code for it:

Code: Select all
<select name="selectpoemtype">
      <option orderfourline="">4 Line Poem/$15</option>
      <option ordereightline="">8 Line Poem/$25</option>
      <option ordertwelveline="">12 Line Poem/$40</option>
      <option ordersixteenline="">16 Line Poem/$50</option>
      <option ordertwentyline="">20 Line Poem/$75</option>

How do I enter these options into my phpmyadmin table? What would I enter into "column" and "type" and so on?

Thank you,
Posts: 60
Joined: Sun Apr 19, 2009 12:51 am

Postby ollie » Wed Aug 17, 2011 3:05 am

They would be TEXT (65,535 characters) or MEDIUMTEXT (16,777,215 characters) field types.
Posts: 2749
Joined: Mon Jul 25, 2005 11:26 am
Location: Bathurst NSW Australia

Postby DarkSnow » Sun Oct 02, 2011 9:14 pm

It depends very much on the rest of the application.

Firstly I should point out that this is not valid HTML. Each of the option elements has an invalid attribute. You should perhaps have a value="" with the value in it.

As to what that value should be. Well, it could be a string, as suggested in the first reply, but an easier way might be to use an integer and have the number of lines in the poem. Or even an integer with the primary key in your "poem type" table.

That table could then contain the price, description, line count, etc.

So, as I say, it depends how you've written the rest of the app.
User avatar
Posts: 12
Joined: Thu Jul 14, 2005 11:44 am
Location: Fife, Scotland

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests