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
admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im no
GMail like Chat in ASP.NET
Hi,Can anyone suggest me, how to incorporate GMail like chat in my existing ASP.Net application.I wa
A Few Questions
Hi, I want to ask a few questions that I can't seem to find..
1) I'm creating a "shortcu
help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i
Add trigger to UpdatePanel programmatically
Hi,I'm working on a website which uses AJAX and Masterpages. What I have is an AJAX UpdatePanel whi
Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student
modifying a property of an object from a different class
I have 2 classes:
- Math
- Distance
in my math class, I have this line:
$distance =
Change log of Cost centre change in Plant maintenance order
Hi,
How to view Change log of Cost centre in Plant maintenance order. Not visible thru 'Docume
Login Functionality Working Different on IE
This is an odd one, I have a site which has an admin section. The admin pages unsurprisingly require
Why do I get this error
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/a5488351/public_html/b