Help a newbee save my job !


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

Hey guys i am dying here i am new to php and would like for someone to help me with this problem

i have a script that send information from a "form" but the probelm is that i need this to be autheticated (smtp) before sending the email.

here is the script that i am using: (If you know what i need to do to authenticate this smtp please HELP ME!)

<?php
$emailmanager = 'oscarm@crystalplace.com';

error_reporting(0);
$msg = '';
foreach ($_POST as $k => $v) { $msg .= $k.': '.$v."nn"; }

$email = trim($_POST['email']);
$Ok = ereg("^([a-zA-Z0-9_.-]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([a-zA-Z0-9-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", $email);


$headers = 'From: ' . $email . "n";
$headers .= 'MIME-Version: 1.0' ."n";
$headers .= 'Content-Type: text/plain; charset=iso-8859-1' ."n";
$headers .= 'Content-Transfer-Encoding: 8bit'. "nn";

if ($Ok) {
mail($emailmanager,'New Trade Form Request from Brilliante Crystal Cleaner',$msg,$headers);






?>
<script language = 'javascript'>
alert('Thank you For Submiting Your Application ---> Brilliante Crystal Cleaner Team <---');
window.close();
</script>
<?
} else {
?>
<script language = 'javascript'>
alert('Sorry, please complete the form.');
history.go(-1);
</script>
<?
}


?>

No comments posted yet

Your Answer:

Login to answer
129 Like 49 Dislike
Previous forums Next forums
Other forums

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

php - xml what is the best way to do this.
IN essence I want to have a script calling the info from the database.. I have no problem thus far,

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