» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2006, 01:13 PM
admirer admirer is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
admirer is on a distinguished road
Default trouble showing input type field

Hi folks

I have the following problem. When i'm trying to add the following code to my input type field:
<input type="radio" NAME="music" value="<?php if(isset($_POST['music'])) echo $_POST['music']; ?>" />
it always shows the code in the value in the input type field. WHy? Any ideas?
And how can i insert a code for the parameters of an option field, so that when they are sent they go into a mysql database? I use the code above for all the input type fields, but i really have no idea about the option field

<SELECT NAME="Pop singer">
<option value="BS">Britney Spears</option>
<option value="CD">Celine Dion</option>
<option value="MC">Mariah Carey</option>

Plz guide, thx -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-15-2006, 01:14 PM
blakey blakey is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
blakey is on a distinguished road
Default

first of all remove the space from SELECT name, you cannot have spaces in the name...

after removing spaces on the action page of this form just fetch it from $_POST as you do for any other input field, like


PHP Code:
$singer_name = $_POST['pop_singer'];



for the first problem you may want to use braces around the IF statement. I am not sure if it will make any difference but you can try it. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:37 AM.