'; mysql_select_db($dbname); if(! get_magic_quotes_gpc() ) { $first_name = addslashes ($_POST['first_name']); $emailid = addslashes ($_POST['emailid']); $phone = addslashes ($_POST['phone']); $company_name = addslashes ($_POST['company_name']); $title = addslashes ($_POST['title']); $message = addslashes ($_POST['message']); } else { $first_name = $_POST['first_name']; $emailid = $_POST['emailid']; $phone = $_POST['phone']; $company_name = $_POST['company_name']; $title = $_POST['title']; $message = $_POST['message']; } # Get maximum hite paper ID $sql = "SELECT max(wpid) FROM whitepapers_info"; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not get maximum white paper id from the table: ' . mysql_error()); } $row = mysql_fetch_row($retval); $title = ereg_replace("&", "&", $title); $message = ereg_replace("&", "&", $message); $message = substr($message, 0, 255); $wpid = $row[0]; $wpid += 1; $ip_address = $_SERVER['REMOTE_ADDR']; if( $_FILES['file']['name'] != "" ) { if( $_FILES['file']['size'] > ( 1024*1024*10 )){ die( "File tto big to upload...."); } # Get file extension $extension = end(explode(".", $_FILES['file']['name'])) ; move_uploaded_file($_FILES['file']['tmp_name'],"/var/www/tutorialspoint/white-papers/$wpid.$extension" ) or die( "Could not copy file"); } $sql = "INSERT INTO whitepapers_info". "(wpid,extension,first_name,emailid,phone,company_name, title, message, hits, status, dated, ip) ". "VALUES ( '$wpid','$extension', '$first_name','$emailid','$phone', '$company_name', '$title', '$message', 0, 'p', NOW(), '$ip_address')"; $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not enter data into table: ' . mysql_error()); } mysql_close($conn); # Send of email to admin $to = "amrood.admin@gmail.com"; $subject = "White Paper: $title"; $header = "From:webmaster@tutorialspoint.com \r\n"; $retval = mail ($to,$subject,$message,$header); # Send response back. header("Location:http://www.tutorialspoint.com/addwhitepaper-response.php"); exit(0); } ?> Submit White Papers


  Home     References     About TP     Help Us  

Submit White Paper & Articles

previous next

Using this section you can share your knowledge in the following form:

  • A White Paper

  • A Tutorial

  • An Article

  • A Presentation

  • Other written stuff

To submit any of the above documents, fill out the form below and attach your document. We will compile your document in our format and will upload on tutorialspoint.com with your name and other information you provide.

By submitting any of the above documents , the poster warrants that the docuemnt does not infringe the intellectual property rights of any third party and/or that the paper only uses third-party work pursuant to proper license.


 NOTE: Fields marked with * are mandatory:

*Submitted By:
*E-mail
Phone
Company
*Document Title
*Attach Document
*Security Code ( Type: HUMAN )
 *Short Description of Whitepaper: 
    

previous next