NameSilo

Php formmail question

SpaceshipSpaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
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
•••
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
•••
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
•••
oh thanks a lot mate.. great

it works..

thanks a lot
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back