Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Forms: how to change the display value
Old 03-03-2011, 08:53 PM Forms: how to change the display value
drkeni9ma's Avatar
Skilled Talker

Posts: 66
Name: Anakin Skywalker
Trades: 0
Hello,

I'm using this HTML code:
<td align="right">Alphabet:</td> <td><select name="Alphabet">
<option value="1">Apple</option>
<option value="2">Banana</option>
<option value="3">Cat</option>
<option value="4">Dog</option>
<option value="5">Elephant</option>

and this PHP code:
<td align="center"><?php echo $row3["Alphabet"];?></td>

Question:
When I run the script, it outputs "1,2,3,4,5";
How can I display the word "Apple", "Banana", "Cat", etc?
__________________
No. Leave them to me. I will deal with them myself. You don't know the power of the dark side!
drkeni9ma is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-03-2011, 09:02 PM Re: Forms: how to change the display value
Marik's Avatar
Skilled Talker

Posts: 99
Trades: 0
Well, that's definitely not the full php code you posted. But try using this html:
HTML Code:
<select name="Alphabet">
<option value="Apple">Apple</option>
<option value="Banana">Banana</option>
<option value="Cat">Cat</option>
<option value="Dog">Dog</option>
<option value="Elephant">Elephant</option>
</select>
__________________

Please login or register to view this content. Registration is FREE
Marik is offline
Reply With Quote
View Public Profile
 
Old 03-03-2011, 09:42 PM Re: Forms: how to change the display value
drkeni9ma's Avatar
Skilled Talker

Posts: 66
Name: Anakin Skywalker
Trades: 0
Hi Marik,
Thanks for the quick reply..

I've tried it yesterday over and over again but still can't output "apple"..
__________________
No. Leave them to me. I will deal with them myself. You don't know the power of the dark side!
drkeni9ma is offline
Reply With Quote
View Public Profile
 
Old 03-03-2011, 10:14 PM Re: Forms: how to change the display value
Marik's Avatar
Skilled Talker

Posts: 99
Trades: 0
Then post your FULL code, both html and php and we can take a look.
__________________

Please login or register to view this content. Registration is FREE
Marik is offline
Reply With Quote
View Public Profile
 
Old 03-03-2011, 11:04 PM Re: Forms: how to change the display value
drkeni9ma's Avatar
Skilled Talker

Posts: 66
Name: Anakin Skywalker
Trades: 0
Thanks Marik, It worked! I was missing some "' '" that's why it doesn't work..
__________________
No. Leave them to me. I will deal with them myself. You don't know the power of the dark side!
drkeni9ma is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Forms: how to change the display value
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.86226 seconds with 12 queries