Hi there,
I am a new user to PHP!
i have set up an web from which will collect information from an user and send to an email address.
I have known how to send the simple form like which has name, from (email), message, but i want to get more information from the users like their address, country, and other info.. and i could not include in my script/code.
Here is the php script done by somebody else.. i just want know to this BOLD Script.. because if i apply to my form it doesnot work.. can anyone help? thank you..
<?php
$address = "$address1 $address2";
$address = trim($address);
if ((!$name) || (!$email) || (!$occupation) || (!industry) || (!$mm) || (!$dd) ||
(!$yyyy) || (!$gender) || (!$address) || (!$city) || (!$country) ||
(!zip) || (!$pref) || (!$cservice)) {
$stat = "error";
include "covenant_AF.php";
} else {
$fd = popen("/usr/sbin/sendmail -t","w");
fputs($fd, "To: mai@domain.com\n");
fputs($fd, "From: $name <$email>\n");
fputs($fd, "Subject: Covenant Partnership\n");
fputs($fd, "X-Mailer: Email Covenant Partnership\n");
fputs($fd, "\n\nName : $name\n");
fputs($fd, "Email : $email\n");
fputs($fd, "Occupation : $occupation\n");
fputs($fd, "Industry : $industry\n");
fputs($fd, "Birthday : $mm $dd, $yyyy\n");
fputs($fd, "Gender : $gender\n");
fputs($fd, "Address : $address1 $address2\n");
fputs($fd, "City : $city\n");
fputs($fd, "Country : $country\n");
fputs($fd, "Zip : $zip\n");
fputs($fd, "Preference : $pref\n");
fputs($fd, "Courier Service : $cservice\n");
pclose($fd);
$fd = popen("/usr/sbin/sendmail -t","w");
fputs($fd, "To: $email\n");
fputs($fd, "From: [email]mail@domain.com[/email]\n");
fputs($fd, "Subject: Covenant Partnership Auto Responder\n");
fputs($fd, "X-Mailer: Email Covenant Partnership\n");
fputs($fd, "\n\n\n");
fputs($fd, "Congratulations!\n\n");
fputs($fd, "You are now a Covenant Partner of God's Blessings!\n\n");
fputs($fd, "Expect an overflow of blessings, financially, physically and\n");
fputs($fd, "spiritually when you give your tithes.\n\n");
fputs($fd, "God be with you always!\n");
pclose($fd);
header("Location: success_application.php");
}
?>