FORUMS: list search recent posts

php email form

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Greg Parrottphp email form
by on Dec 13, 2010 at 2:40:22 pm

i have recently been creating a website for a wholesale butchers and one of their requirements are that they want a request from emailed to their sales department. i have used sendresults.php however it only shows one item out of a field with more than one product selected. i am wandering how to get this script to show all that is selected in the form and not just one item from each field

Return to posts index

Richard WilliamsRe: php email form
by on Dec 13, 2010 at 7:35:56 pm

what is sendresults.php?

There are two post that can help you build your own PHP script, here is one

and the other is HERE

If you read the code from the first post link, i typed instructions explaining what i was doing and what each element is and why it works... so you aught to be able to do something very similar and create your very own php script to do whatever you want it to do.

If i have misunderstood your post, please show us the code of the form you are using and the php used to send the info.

Richard Williams
p.s. Please remember to rate our post replies and tick if solved. Also, please remember that we here are NOT employed by Adobe, we do this out of love and fun, so its always nice to recieve a Please and Thank You! :o)

Return to posts index

Greg ParrottRe: php email form
by on Dec 14, 2010 at 9:28:07 am

this is the send sendresults.php which sends what ever is on the form

//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject = 'Order Request';

// Your email address. This is where the form information will be sent.
$emailadd = '';

// Where to redirect after form is processed.
$url = '';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';

// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
foreach ($_POST as $key => $value)
if ($req == '1')
if ($value == '')
{echo "$key is empty";die;}
$j = strlen($key);
if ($j >= 500000)
{echo "Name of form element $key cannot be longer than 500000 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '';

Return to posts index

Fernando MolRe: php email form
by on Dec 30, 2010 at 11:50:29 pm

Without looking at your Form code all I can say is that you should ask to your ISP for a contact form mail code. Different host services could has different restrictions.

With this said, the content of your message is assigned in the variable $text, so you should add all the info you need to that variable to be sent.

I hope this helps

Return to posts index

Post removed.

Post removed.

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved