Extra fields in main body and php required.


Posted on 16th Feb 2014 07:03 pm by admin

I'm new to PHP so please be gentle. I have a little php script below that works well.
The "$msgVar" goes into the body message of the email. How can I effect additional
fields that can be filled with information that also go into the body of the email in such
a way that they have there own seperate fields of answers with atleast a double space
between each field that is answered. For example: With thanks. Brian

Answer One:

Answer Two:

Answer Three:


<?
if ($send=="yes") {
$to = "my@address";
$subject = "$subjectVar";
$body .= "$msgVar";
$from = "$nameVar";
$tfrom = "From: <$emailVar>";
mail($to,$subjectVar,$msgVar,$tfrom);
}
echo "&errormessage=Email has been sent&";
?>

No comments posted yet

Your Answer:

Login to answer
339 Like 25 Dislike
Previous forums Next forums
Other forums

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

reating a background image
I am building a site in drupal and have a php form in it, due to certain annoyances with module buil

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

Match stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

Multiple includes losing variables
Hey all,

just starting out w php and ran into a problem pretty quickly. I'm
including seve

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash