I have writen the code, i think it is correct but it still isent working , im using windows 7 with xamp server apach and mysql server running so i dont get what the problem is. Here is the code
<?php
$to='g_skill_the_man@yahoo.com';
$subject='Commanda';
$name=$_POST['name'];
$email=$_POST['email'];
$topic=$_POST['topic'];
$message=$_POST['message'];
$body =<<<EMAIL
Comanda de la $name
Cu adressa de $mail
$topic
$message
EMAIL;
$header= "From: $email";
mail($to,$subject,$body,$headers);
?><head>
<link href="Styles/StylesContacte.CSS" rel="stylesheet" type="text/css">
<title>Contacte</title>
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<hr />
<style type="text/css">
form {
width:480px;
margin-left:auto;
margin-right:auto;
text-align:center;
}
form ul {
list-style-type:none;
}
form ul li {
margin:5px 5px;
}
form label {
display:block;
border:#ccc;
font-size:16px;
}
form input , select{
font-size:16px;
width:100%;
background-color:#FFFFFF;
}
#message textarea {
border:solid 3px #ccc;
background-color:#FFFFFF;
}
</style>
</head>
<body>
<header>
<div id="banner">
<img src="Pictures/Untitled-3.png" name="BannerPic" width="650" height="163" id="BannerPic">
</div>
</header>
<div id="menu">
<div id="menu_center">
<ul>
<li><a href="Home.html">Home</a></li>
<li><a href="Produse.html">Produse</a></li>
<li><a href="Cumsefabrica.html">Cum se fabrica</a></li>
<li><a href="Mangalita.html">Mangalita</a></li>
<li><a href="Contacte.html">Contacte </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="holder">
<div id="text1">
<textarea name="Description" cols="80" rows="23" readonly class="nosize-text" id="Desc" height="150" resize="none">
</textarea>
</div>
<div id="mail">
<form action="?" method="post">
<ul>
<li>
<label for="name">Numele:</label>
<input type="text" name="name" id="name" />
</li>
<li>
<label for="email">Email:</label>
<input type="text" name="email" id="email" />
</li>
<li>
<label for="topic">Comanda:</label>
<select id="topic" name="topic">
<option value="Ponies">Salam</option>
<option value="Mexicans">Sunca</option>
<option value="Weiner">Carnati</option>
</select>
</li>
<li>
<label for="message">Tell me something</label>
<textarea id="message" name="message" cols="42" rows="7"> </textarea>
</li>
<li>
<input type="submit" value="Trimite">
</li>
</ul>
</form>
</div>
</div>
<footer>
<table border="0" align="center" cellpadding="10" cellspacing="5" id="table1">
<tr>
<td><a href="Home.html">•Home</a></td>
<td><a href="Produse.html"> •Produse</a></td>
<td><a href="Cumsefabrica.html"> •Cum se fabrica</a></td>
<td><a href="Mangalita.html"> •Mangalita</a></td>
<td><a href="Contacte.html"> •Contacte</a></td>
</tr>
</table>
</footer>
</div>
</body>
</html>

New Topic/Question
Reply



MultiQuote






|