Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

PHP Send Email with attachment

the mail() function

Moderators: macek, egami, gesf

PHP Send Email with attachment

Postby karcrush » Fri Apr 15, 2011 11:46 pm

I'm new in PHP development, and I've design a careers page where user able to send a request with their CV attachment, but from server, php file not respond.... I've check localy its working and another hosting page is correctly working... here is the main page code: Please advice me is there any problem with HTML code, because I'm totaly new in PHP, I've just put PHP code into my HTML code....


<?php
//start session
session_start();

// Include all the output functions
require_once('fns.php');

// populate input fields into the session using a sub-array
// check http://www.scriptygoddess.com/archives/ ... es-in-php/
// also check the above link for remembering checkboxes values
$_SESSION['myForm'] = $_POST;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<TITLE>Welcome to Quantum | Global Communication</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="resource-type" content="Document">
<meta name="classification" content="Internet">
<meta name="description" content="Quantum Global Communication has diversified telecom investments in USA, Pakistan and United Kingdom, together with its affiliates in these countries QGC is a multi-market Telecom operator">
<meta name="keywords" content="telecom, telecommunication, operator, global telecom services, mobility, satelite, satelite communications, kite mobile, kite communications, international calls, low cost calls, cheap international calls, low cost international calls, pay as you go, pay as you go sim, prepaid mobile, cheap calls, free sim, mobile calls overseas, mobile calls international, cheap phone calls, cheapest calls, low cost texts, cheap texts, free sim card, low cost texts, low cost sms, cheap sms, no contract, mobile calls, cheap mobile calls uk, uk, kite, Pakistan">
<meta name="robots" content="ALL">
<meta name="revisit-after" content="30 days">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<meta name="copyright" content="Copyright © 2011-2012 Quantum Global Communications qgcommunictaions.com">
<meta name="made" content="info@qgcommunications.com">
<meta name="language" content="English">
<meta name="doc-type" content="Web Page">
<meta name="page-topic" content="Quantum Global Communications">
<meta name="doc-class" content="Published">
<meta name="doc-rights" content="Copywritten Work">
<meta name="doc-publisher" content="http://www.qgcommunications.com">
<meta http-equiv="url" content="http://www.qgcommunications.com">
<meta http-equiv="author" content="Copyright © 1998-2011 dotDezine.com Khursheed Alam">
<meta name="audience" content="All Major Communications Business Services">
<LINK rel=stylesheet type=text/css href="css/style.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Upload Form</title>
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
line-height: 135%;
margin-left:0px;
}
#uploadform {width: 350px;}
label {display: block;}
input, textarea {width: 90%;}
input#submit {width: auto;}
.required {color: red;}
#formfeedback {background: #fdfbab; padding: 5px;}
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF TOPMARGIN=0 MARGINHEIGHT=0 background="images/bg.jpg">
<div align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="left">
<div align="center">
<table border="0" width="946" cellspacing="0" cellpadding="0" height="100%" align="center">
<tr align="center">
<td valign="top" align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td bgcolor="#FFFFFF" height="202" valign="top">
<a href="index.html">
<IMG SRC="images/index_01.jpg" WIDTH=188 HEIGHT=202 ALT="Quantum Global Communications inventing the ideas to communicate" border="0"></a></td>
<td height="202" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="758" height="25" bgcolor="#DA511F" class="top">
<div align="left"><font face="Arial" color="#FFFFFF" size="1">&nbsp;&nbsp;&nbsp;&nbsp;
<a href="index.html">Home</a>&nbsp;&nbsp; |&nbsp;&nbsp;
<a href="about.html">About QGC</a>&nbsp;&nbsp; |&nbsp;&nbsp;
<a href="contact.html">Contact Us</a></font></div></td>
</tr>
<tr>
<td width="758" height="57" bgcolor="#DA511F">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="613">
<map name="FPMap0">
<area href="kite-mobile.html" shape="rect" coords="7, 7, 113, 24">
<area href="kite-communications.html" shape="rect" coords="159, 6, 312, 25">
<area href="satellite_communications.html" shape="rect" coords="354, 6, 536, 25">
<area href="voice_wholesale.html" shape="rect" coords="575, 7, 725, 26">
</map>
<img border="0" src="images/qg-group-4.jpg" width="758" height="31" usemap="#FPMap0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="120" align="left">
<img border="0" src="images/header1.jpg" width="758" height="120"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="10" width="13"></td>
<td height="10" valign="top" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; ">
</td>
<td height="10" width="15"></td>
</tr>
<tr>
<td height="25" width="13">&nbsp;</td>
<td height="25" class="orange_text_small" valign="top" style="border-bottom:1px solid #999999; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-left-color:#999999; border-right-color:#999999; border-top-color:#999999">
<span style="letter-spacing: 2px; font-weight:700">
<font size="3">About Quantum</font></span></td>
<td height="25" width="15">&nbsp;</td>
</tr>
<tr>
<td height="100%" width="13">&nbsp;</td>
<td height="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="15" height="22">&nbsp;</td>
<td valign="top" height="22" class="navigation_links" bordercolor="#999999">
<div align="left"><a href="chairman_message.html">Message from Chairman</a></div></td>
</tr>
<tr>
<td width="15" height="22">&nbsp;</td>
<td valign="top" height="22" class="navigation_links" bordercolor="#999999">
<div align="left"><a href="management_team.html">Management Team</a></div></td>
</tr>
<tr>
<td width="15" height="22">&nbsp;</td>
<td valign="top" height="22" class="navigation_links" bordercolor="#999999">
<div align="left"><a href="affiliates.html">Affiliates</a></div></td>
</tr>
<tr>
<td width="15" height="100%">&nbsp;</td>
<td valign="top" height="100%">&nbsp;</td>
</tr>
</table>
</td>
<td height="100%" width="15">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
</table>
</td>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td bgcolor="#FFFFFF" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%" align="left">
<tr>
<td height="60" class="orange_text" valign="bottom" align="left">
<div align="left"><font size="3">Careers</font></div></td>
</tr>
<tr>
<td valign="top" class="grey_text" align="left">
<br>
<div id="uploadform">
<?php
// contact form
if (isset($_POST['submitted']) && ('true' == $_POST['submitted'])) {
// checks if the form is submitted and then processes it
process_form();

} else {
// else prints the form
print_form();
}


?>
</div>
</body>
<b><br>
</b><br>
<br>
&nbsp;</p>
</td>
</tr>
</table>
</td>
<td width="232" bgcolor="#FFFFFF" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="41" width="30">&nbsp;</td>
<td height="41">&nbsp;</td>
<td height="41" width="15">&nbsp;</td>
</tr>
<tr>
<td width="30" height="366">&nbsp;</td>
<td height="366" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td height="18" bgcolor="#DA511F" width="100%">
<p align="left"><font color="#FFFFFF" size="2">&nbsp;&nbsp;
Press Release</font></td>
<td height="18" bgcolor="#DA511F" width="21">
<img border="0" src="images/panel-right.jpg" width="21" height="18"></td>
<td width="16" height="18">
<img border="0" src="images/panel-left.jpg" width="16" height="18"></td>
</tr>
<tr>
<td height="100%" bgcolor="#F1F1F1" colspan="2" valign="top" class="orange_text">
<iframe name="I1" src="pressrelease.html" scrolling="no" width="180" height="366" align="center" border="0" frameborder="0" marginheight="1" marginwidth="1" target="_parent">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></td>
<td width="16" height="100%">&nbsp;</td>
</tr>
</table>
</td>
<td width="15" height="366">&nbsp;</td>
</tr>
<tr>
<td width="30" height="100%">&nbsp;</td>
<td height="100%">&nbsp;</td>
<td width="15" height="100%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<TR>
<TD bgcolor="#DA511F" height="2">
<IMG SRC="images/spacer.gif" WIDTH=946 HEIGHT=2 ALT=""></TD>
</TR>

</td>
</tr>
<TR>
<TD height="49" class="footer_links">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="188" valign="top">
<font face="Arial" size="1" color="#808080">&nbsp;&nbsp;&nbsp;&nbsp;
</font>
<font face="Arial" size="1">Powered by:
</font>
<font face="Arial" size="1" color="#808080">
<a title="The Design Studio DOTDEZINE Inc." target="_blank" href="http://www.callnserv.com/?ref=qgcommunications.com">
<span style="font-size: 8pt">CALLNSERV</span></a></font></td>
<td width="810" class="footer_links">
<p align="right"><font color="#666666">&nbsp; </font>
<font face="Arial" color="#666666" size="1"><a href="index.html">
Home</a>&nbsp;&nbsp; |&nbsp;&nbsp;
<a href="careers.php">Careers&nbsp;</a>&nbsp; |&nbsp;&nbsp;
<a href="kite-mobile.html">Kite Mobile</a>&nbsp;&nbsp; |&nbsp;&nbsp;
<a href="kite-communications.html">Kite Communications</a>&nbsp;&nbsp;
|&nbsp;&nbsp;
<a href="satellite_communications.html">Satellite Communications</a>&nbsp;&nbsp;
|&nbsp;&nbsp; </font><font face="Arial">
<a href="voice_wholesale.html">QGC Voice Wholesale</a></font><font face="Arial" color="#666666" size="1">&nbsp;&nbsp; |&nbsp;&nbsp; <a href="contact.html">
Contact Us</a>&nbsp;&nbsp;&nbsp;&nbsp;
<br>
Copyright </font>
<font color="#666666" size="1" face="Times New Roman">© </font>
<font face="Arial" color="#666666" size="1">2011&nbsp;&nbsp; |&nbsp;&nbsp;
Quantum Global Communications&nbsp; All Rights Reserved&nbsp;&nbsp;&nbsp;&nbsp;
</font></td>
</tr>
</table>
</TD>
</TR>
</table>
</div>
</td>
</tr>
</table>
</div>
</BODY>
</HTML>
<?php session_destroy(); //unset session data ?>


Please write down the full code of this page, it'll be highly appreciated... Because I don't know how conver HTML page into PHP code... I've just simply added PHP code into my HTML file.
karcrush
New php-forum User
New php-forum User
 
Posts: 1
Joined: Fri Apr 15, 2011 11:41 pm

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.