Need help for form code...
Posted: Fri Sep 15, 2006 8:16 am
Hi Guys
I'm very new to php wicth i've only just read from books want to set a php feedback page for my website but have it sent to my out look express. however i want to add a day date and time to my feedback page in the e-mail so when the e-mail comes in it will show there user id time country and so would also like to add to radio buttons o my feedback page. can someone help us out done most of the work but don't no the coding for the rest of it
Regars
mike from the Land down under...
I'm very new to php wicth i've only just read from books want to set a php feedback page for my website but have it sent to my out look express. however i want to add a day date and time to my feedback page in the e-mail so when the e-mail comes in it will show there user id time country and so would also like to add to radio buttons o my feedback page. can someone help us out done most of the work but don't no the coding for the rest of it
Regars
mike from the Land down under...
Code: Select all
<?php
if ( !defined( 'SMARTY_DIR' ) ) {
include_once( 'init.php' );
}
$cmd = $_POST['cmd'];
if ( $cmd == 'posted' ){
$txtname = trim($_POST['txttitle']);
$txte-mail Address: = trim($_POST['txtname']);
$txtphone number = trim($_POST['txtemail']);
$txtcountry = trim($_POST['txtcountry']);
$txtdepartment = trim($_POST['txtcountry']);
$txttopic = trim($_POST['txtcomments']);
$From = $config['admin_email'];
$To = $config['feedback_email'];
$Subject = str_replace('SITENAME',$config['site_name'],get_lang('email_feedback_subject'));
$message = get_lang('feedback@somesite.com', MAIL_FORMAT);
$message = str_replace('#txtname#',$txttitle,$message);
$message = str_replace('#txtemail address#', $txtname,$message);
$message = str_replace('#txtphone number#',$txtemail,$message);
$message = str_replace('#txtcountry#', $lang['countries'][$txtcountry],$message);
$message = str_replace('#txtdepartment#', $txtoffice, $message);
$message = str_replace('#SITENAME#',$config['http://www.somesite.com'],$message);
$success= mailSender($From, $To, $To, $Subject, $message);
$t->assign( 'success', $success );
}
$t->assign('rendered_page', $t->fetch('feedback.tpl') );
$t->display( 'index.tpl' );
exit;
?>