Thanks, I agree about learning more, spent yesterday afternoon pouring over php books, only one showed a image after the php insert, did my like that but still couldn't come up with anything, another showed about having a separate header, footer and middle content area but was hoping to keep mine one solid template. I've modified AutoCad code and some html code, so thought I could see something if it was wrong.
I didn't get any type of error message, just when I loaded the php file up on the web, it stopped at the end of the php, ?>, (the php form works, just not the stuff after it) but what is best type of template to have with php, one complete template or separate header, footer and middle content, still would think a image in the middle content after the php won't load,
so here's the php code and what is after it that is not loading up on the web.
Thanks for your help,
<TD width="572" height="100%"><?php
/
Contact Us form and sending (interface for sending feedbacks to site administration)
* @subpackage User Mode
/
include "./include/config.php";
include "./common.php";
include "./include/config_index.php";
include "./include/functions_index.php";
include "./include/functions_auth.php";
include "./include/class.phpmailer.php";
include "./include/functions_mail.php";
$user = auth_index_user();
RefreshAccount($user);
if(!$user[0]) ////// if user not registered
header("location: ".$config["site_root"]."/index.php");
///// check ins messages if user not guest
if($user[3] != 1){
GetAlertsMessage();
SetModuleStatistic(GetRightModulePath(FILE));
}
$PHPmailer = new PHPMailer();
$sel =$POST["sel"]?$POST["sel"]:$_GET["sel"];
switch($sel){
case "contact": ContactSend(); break;
default: ListTableContact();
}
function ListTableContact($err=""){
global $lang, $config, $config_index, $smarty, $dbconn, $user;
Banners(GetRightModulePath(__FILE__));
LeftMenu();
IndexHomePage();
$file_name = (isset($_SERVER["PHP_SELF"]))?AfterLastSlash($_SERVER["PHP_SELF"]):"contact.php";
$smarty->assign("active_user_info", GetActiveUserInfo($user));
$form["action"] = $file_name;
$form["err"] = $err;
$form["hidden"] = "<input type=hidden name=sel value=contact>";
$form["kcaptcha"] = $config["site_root"].$config_index["kcaptcha"];
$data["name"] = $_POST["name"];
$data["email"] = $_POST["email"];
$data["subject"] = $_POST["subject"];
$data["body"] = $_POST["body"];
$smarty->assign("form", $form);
$smarty->assign("data", $data);
$smarty->assign("section", $lang["subsection"]);
$smarty->assign("header", $lang["contact_us"]);
$smarty->display(TrimSlash($config["index_theme_path"])."/contact_table.tpl");
exit;
}
function ContactSend(){
global $lang, $config, $config_index, $smarty, $dbconn, $user, $PHPmailer, $lang_mail_code, $charset_mail, $lang_mail;
$name = FormFilter($_POST["name"]);
$email = $_POST["email"];
$subject = FormFilter($_POST["subject"]);
$body = FormFilter($_POST["body"]);
if(!strlen($name)){
$err = $lang["err"]["invalid_feilds"]."<br>".$lang["contact_us"]["name"];
ListTableContact($err); return;
}
if(!strlen($subject)){
$err = $lang["err"]["invalid_feilds"]."<br>".$lang["contact_us"]["subject"];
ListTableContact($err); return;
}
if(!strlen($body)){
$err = $lang["err"]["invalid_feilds"]."<br>".$lang["contact_us"]["body"];
ListTableContact($err); return;
}
if(!(isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] == $_POST['keystring'])) {
$err = $lang["err"]["invalid_security_code"];
ListTableContact($err); return;
}
unset($_SESSION['captcha_keystring']);
$data["body"] = $body;
//// select from db all users who want to recieve news from site
$site_mail = GetSiteSettings("site_email");
$strSQL = "SELECT lang_file, code, charset FROM ".LANGUAGE_TABLE." WHERE id=".$config["default_lang"];
$rs=$dbconn->Execute($strSQL);
include $config["path_lang"]."mail/".$rs->fields[0];
$lang_mail_code = $rs->fields[1];
$charset_mail = $rs->fields[2];
$err = SendMail($site_mail, $email, $subject, $data, "mail_contact_form_message", "", "administrator of ".$config["server"], $name);
if(!$err){
$err = $lang["err"]["contact_send"];
$_POST["name"] = "";
$_POST["email"] = "";
$_POST["subject"] = "";
$_POST["body"] = "";
}
ListTableContact($err); return;
}
?> </TD>
<TD width="71"><img src="/templates/MjFriend_theme/images/tn_80159.jpg" width="239" height="400"></TD>
</TR>
</TABLE></TD>
<TD width="50%" height="100%" background="/templates/MjFriend_theme/images/l1b.jpg" bgcolor="#628BF5"> </TD>
</TR>
<TR>
<TD background="/templates/MjFriend_theme/images/l2.jpg" width="50%"></TD>
<TD background="/templates/MjFriend_theme/images/3.jpg" WIDTH=766 HEIGHT=35 ALT="">
<div style="padding-top:12px;padding-left:30px " align="center">
Copyright © 2008 MjFriendships.com. All Rights Reserved. <a href="http://www.mjfriendships.com/map.php" class="1">Site Map</a>. <a href="http://www.mjfriendships.com/info.php?sel=3" class="1">Terms of use</a>. <a href="http://www.mjfriendships.com/contact.php" class="1">Contact Us</a></div> </TD>
<TD background="/templates/MjFriend_theme/images/l2.jpg" width="50%"></TD>
</TR>
</TABLE>
</center>
</BODY>
</HTML>[/COLOR]