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>
<?
}


?>

129 Like 49 Dislike
Previous php-forum Next php-forum
Other php-forum

Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

Sort Alternative/bi-monthly
Hi all,

Am going mad trying to get something to work.

I'm creating a CMS for a magazi

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

xml
<?php

echo "<h1>XML Articles</h1>";

$home

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

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