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.
Did you know?Explore Trending and Topic pages for more stories like this.
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
49
Other forums
MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha
Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste
having a small php error tha deals with the 'foreach'
Last night i was working on a script for a cart and it seemed to working good, until this morning. F
Setting condidtions for an input box
Hi all,
I would like to set a condition in a txt box that says the number a user enters has t
array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.
the followi
upgrade from 4.7 to ECC 6.0
Hi all,
we are going to do an upgrade from R/3 4.7 to ECC 6.0. I need to know if i can find som
Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and
Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the
Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?
OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an