Location: PHPKode > projects > MyOWNSpace > MyOWNspace_v8.2/www/mailto.php
<?
$cryptinstall="classes/crypt/cryptographp.fct.php";
include $cryptinstall; 

include "header.php";
include "config.php";
if(chk_crypt($_GET['code'])){

		// was submitted and has valid keys
			// PUT IN ALL YOUR STUFF HERE //
if(isset($_GET['from']))
{
$id=$_GET['id'];
$from=$_GET['from'];
$name=$_GET['name'];
$to=$myspace[$id]['contact'];
$subject=$_GET['subject'];
$message='message from : '.$name.
"\n--------------------------------------------------------------------------------\n".
$_GET['text']."\n\n".'<-- <http://MyOwnSpace.fr> Your underground hosting on the web... -->';

$headers = 'From: '.$name.' <'.$from.'> ' . "\r\n" .
   'Reply-To: '.$name.' <'.$from.'> ' . "\r\n" .
   'X-Mailer: MyOWNspace' ;

if(mail($to, $subject, $message, $headers))
echo'<h3>Message sent!</h3><hr><a href="home.php">Back to MyOwnSpace</a> | <a href="index.php?go='.$id.'">Back to '.$myspace[$id]['owner'].'\'Own Space</a>';
else 
echo'<h3>Error sending message!<a href="mailto.php?go='.$_get['id'].'">try again</a>!</h3><hr><a href="home.php">Back to MyOwnSpace</a> | <a href="index.php?go='.$_get['id'].'">Back to '.$_get['artiste'].'\'Own Space</a>';
}
ELSE ECHO'**ERREUR:MESSAGE INCOMPLET**';
}
else if(isset($_GET['id']))
{
$id=$_GET['id'];
$artiste=$myspace[$id]['artiste'];
$contact=$myspace[$id]['contact'];
$pic=$myspace[$id]['image'];
echo'<H3><img height="66" src="'.$pic.'"> Send a message to '.$artiste.'</H3>
<form name="f" method="get" action="mailto.php">
   From: <br><input type="text" name="from" size="70"><br>
         <input type="hidden" name="id" value="'.$id.'">
         <input type="hidden" name="artiste" value="'.$artiste.'">

Subject: <br><input type="text" name="subject" size="70"><br>
   Name: <br><input type="text" name="name" size="70"><br>
   Message: <br><textarea style=color:black; name="text" cols="70" rows="20"></textarea><br>';
dsp_crypt(0,1);
echo'<br>Pass the test: <br><input type="text" name="code"><hr>
<input type="submit" value="Send">
</form>';}
include "footer.php";
?>
Return current item: MyOWNSpace