Jump to content

Lori De

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by Lori De

  1. I understand what your saying, but I don't know what I am supposed to change.
  2. sorry I'm new to this..what exactly am I replacing with $name != $name2 $name = $_POST["name2"]; or Name: $name2
  3. I took that line out and now I get the senders email address, but nothing else?
  4. here's my html form: <form action="contact2.php" method="post" target="_self" id="contactform"> <ol> <li> <label for="name2">Your Name <span class="red">*</span></label> <input id="name2" name="name2" class="text" /> </li> <li> <label for="youremail">Your email <span class="red">*</span></label> <input id="youremail" name="youremail" class="text" /> </li> <li> <label for="company2">Company</label> <input id="company2" name="company2" class="text" /> </li> <li> <label for="subject2">Subject</label> <input id="subject2" name="subject2" class="text" /> </li> <li> <label for="message2">Message <span class="red">*</span></label> <textarea id="message2" name="message2" rows="6" cols="50"></textarea> </li> <li class="buttons"> <input type="image" name="imageField" id="imageField" src="images/send.gif" /> </li> </ol> </form> Here's my php code: <?PHP global $_POST; $name = $_POST["name2"]; $youremail = $_POST["youremail"]; $company = $_POST["company2"]; $subject = $_POST["subject2"]; $message = $_POST["message2"]; $to = "ldemotts@market-johnson.com"; $subject = "Form Submission"; $headers = "From: $youremail\n"; $message = "A visitor to your site has filled out the following information.\n Name: $name2 Email Address: $youremail Company: $company2 Subject: $subject2 Message: $message2"; if (preg_match(' /[\r\n,;\'"]/ ', $_POST['youremail'])) { exit('Invalid Email Address'); } else { mail($to,$subject,$message,$headers); } ?>
  5. I'm struggling with my php code. I keep getting a "Parse error: syntax error, unexpected '[' in C:\inetpub\wwwroot\test1.php on line 29" I'm new to PHP and I really appreciate any help I can get. Here's my code: #!/usr/local/bin/php4 <?php include('Mail.php'); /* mail setup recipients, subject etc */ $headers["from"] = "emailaddress"; $headers["to"] = "ldemotts@market-johnson.com"; $headers["subject"] = "test"; $mailmsg = "$to, $subject, $body, $headers"; /* SMTP server name, port, user/passwd */ $smtpinfo["host"] = "https://mail.oursite.com"; $smtpinfo["port"] = "25"; $smtpinfo["auth"] = true; $smtpinfo["username"] = "mylogin"; $smtpinfo["password"] = "mypassordi"; $mailmsg = "test"; /* Create the mail object using the Mail::factory method */ $mailto ['$smtp, $smtpinfo']; /* Ok send mail */ $mail_object = send ['$to, $from, $headers, $mailmsg']; /*Client Variables*/ $subject = $_REQUEST['test']; $webMaster =$_REQUEST['myemail@address']; /*Gathering Data Variables*/ $projectnameField = $_POST['projectname']; $ProjectownerField = $_POST['Projectowner']; $emailaddressField = $_POST['emailaddress']; $locationField = $_POST['location']; $completebyField = $_POST['completeby']; $dateField = $_POST['date']; $body = <<<EOD <br><hr><br> Project: $projectname <br> Owner: $Projectowner <br> Email: $emailaddress <br> Location: $location <br> Completed By: $completeby <br> Date: $date <br> EOD; /* Results rendered as HTML */ $theResults = <<<EOD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Voice Of Client</title> </head> <body> Your survey has been submitted. Thank you. </body> </html> EOD; echo "$theResults"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.