Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Php formmail question

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch
Impact
18
hello friends

just need ur urgent help

i am building a php form for my a client

http://allisondailey.com/order.html

i have finished complete form script.. but just dont know one thing how can i output multiple selection...

like see "select package" in that form.. visitor can select multiple options but in email it shows just one option?

what i have to do to make show multiple options?

thanks in advance
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I think it could be a problem on how you're dealing with the multiple selection in the php script.

Let's say this is your original form:

<form>
....
<SELECT name=package size="11" multiple
style="WIDTH: 282; height:auto;">
<option value="Your value">Your value</option>
<option value="Other value">Other value</option>
...
</SELECT>
...
</form>

Now create a new ordersend.php script for testing purposes with the following:

<?php
print "Your selected packages are: ";
foreach($package as $value)
{
print "$value ";
}
?>

I believe that should work, and it should be a hint on how you should deal with the selected values in your real mail script. Hope that makes some sense.

Good luck
 
0
Close
thanks a lot mate but ur solution is not working.. plz check following err

Code:
Your selected packages are:
Warning: Invalid argument supplied for 
foreach() in W:\www\test\test.php on line 4
 
0
Close
Aaargh, my bad...

<SELECT name=package[] size="11" multiple
style="WIDTH: 282; height:auto;">

Note the brackets in package[] Just tried it on my server and it definitely works. You'll be dealing with an array in the php script.

Sorry about it, just pasted a snippet from your form and forgot to rewrite it.
 
0
Close
oh thanks a lot mate.. great

it works..

thanks a lot
 
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back