Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need phpmyadmin enter data help

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
rcayea



Joined: Sun Apr 19, 2009 1:51 am
Posts: 60

PostPosted: Sat Aug 13, 2011 4:41 pm    Post subject: need phpmyadmin enter data help Reply with quote

Hi everyone,

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

Code:

<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>
   </select>




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

Thank you,
Randy[/img]
Back to top
View user's profile Send private message
ollie
Moderator


Joined: Mon Jul 25, 2005 12:26 pm
Posts: 2749
Location: Bathurst NSW Australia

PostPosted: Wed Aug 17, 2011 4:05 am    Post subject: Reply with quote

They would be TEXT (65,535 characters) or MEDIUMTEXT (16,777,215 characters) field types.
Back to top
View user's profile Send private message
DarkSnow



Joined: Thu Jul 14, 2005 12:44 pm
Posts: 12
Location: Fife, Scotland

PostPosted: Sun Oct 02, 2011 10:14 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast