...

View Full Version : How to send this?



Pastrulo
01-15-2008, 08:03 PM
Hi I was wondering how can I sent the output of my form to my e-mail and the inputed e-mail...this is my code this get the output from a form for me and this is what I got so far:


<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

<head>
<style type="text/css">
body {
margin-left:auto;
margin-right:auto;
}
}

.direccion {
text-align: center;
}

td {
border:medium,black;
}

.direccion {
font-family: Arial;
}
</style>
</head>
<body>
<img src="loguito.jpg" /><div style="float:right;width:600px"><a href="#" onclick="javascript:window.print(); return true">Imprimir</a></div> <br /> <br />
<div style="width:auto;text-align:center;border-color:black;text-indent:5px;">

<fieldset style="margin-left:350px;width:400px;"><legend>Su computadora</legend>
<table>

<?php

if($_GET['continue'] != 1)
{
$name = $_GET['class'];

// form items you wish to exclude from the info list. you can just make this blank if you dont want to exclude anything
$exclude = array('submit','hiddenvalue');


foreach($_POST as $class => $val){


// if its in the exclude array, skip it
if(in_array($val, $exclude))
continue;


// print out the info
echo "<tr><td><b>".$class.":</b\></td>\t\t <td>".$val."</td></tr><br />\n";
}



?>

</table>
</fielset>

</div>

<br /><br /><br />
<div style="width:600px;text-align:center;border-color:black;text-indent:5px;>
<br /><br /><br /><br /><br />
<li class="direccion"><a href="WHAT CODE SHOULD GO HERE TO SEND THE INFO IN HERE TO BOTH THE INPUT E_MAIL AND MINE">Si su informacion esta correcta click aqui.</a></li>
<br />
<li class="direccion"> <a href="javascript:history.go(-1);">Si quiere hacer algun cambio click aqui. (Volver)</a></li>

<br /><br />

<p class="direccion"><strong><em><span class="style2">Ave. 14 de Julio contiguo a
Ferreteria Casa Siryi.<br>
PO Box: (504) 440-3555</span></em></strong></p>
<p class="direccion"><br>
<a target="_blank" href="http://www.technosdesign.com">www.technosdesign.com</a></p>
</div>

<?
}

else
{
// do your "its confirmed code"
// for example, forward the user to a page (uncomment the line):
// header("Location: http://url.com");
}

?>

</body>

StupidRalph
01-15-2008, 08:26 PM
You could use the mail function to send it to the input email address and also cc it to yourself.

http://www.php.net/manual/en/function.mail.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum