Location: PHPKode > projects > H-tracker > takecontact.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//

require "backend/functions.php";

if ($HTTP_SERVER_VARS["REQUEST_METHOD"] != "POST")
 show_error_msg("Error", "Method");

   dbconn();

    loggedinonly();

       $msg = trim($_POST["msg"]);
       $subject = trim($_POST["subject"]);

       if (!$msg)
    show_error_msg("Error","Please enter something!");

       if (!$subject)
    show_error_msg("Error","You need to define subject!");

     $added = "'" . get_date_time() . "'";
     $userid = $CURUSER['id'];
     $message = sqlesc($msg);
     $subject = sqlesc($subject);

 mysql_query("INSERT INTO staffmessages (sender, added, msg, subject) VALUES($userid, $added, $message, $subject)") or sqlerr(__FILE__, __LINE__);

       if ($_POST["returnto"])
 {
   header("Location: " . $_POST["returnto"]);
   die;
 }

  stdhead();
  show_success_msg("Succeeded", "Message was succesfully sent!");
       
       stdfoot();
       exit;
?> 
Return current item: H-tracker