Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-inside/addquestion.php
<?php
$AddQuestion = false;
	if(!empty($_POST['asker_name']))
		$AskerName = $_POST['asker_name'];
	else
		$Error['asker_name'] = 'Please provide your name';
	if(!empty($_POST['asker_mail']))
		$AskerMail = $_POST['asker_mail'];
	else
		$Error['asker_mail'] = 'Please provide your e-mail';
	if(!empty($_POST['asker_url']))
		$AskerURL = $_POST['asker_url'];
	else
		$AskerURL = '';
	
	if(!empty($_POST['question']))
		$Question = $_POST['question'];
	else
		$Error['question'] = 'Please write your question';
	
	if(isset($Error))
	{
		foreach($Error as $KeyValue)
			print $KeyValue." <br /> ";
	}
	else
	{
		require_once(PR_PATH.'pr-inside/Convert-to-html.php');
		$AskerName = ConvertToHTML($AskerName);
		$AskerMail = ConvertToHTML($AskerMail);
		$Question = ConvertToHTML($Question);
		$AskerURL = ConvertToHTML($AskerURL);
		$TimeNow = date("YmdHis");
		$DC->Result("INSERT INTO ".PR_DATABASE_PREFIX."askme SET askme_question = '{$Question}', askme_asker_name = '{$AskerName}', askme_asker_url = '{$AskerURL}', askme_asker_mail = '{$AskerMail}', askme_status = 'toanswer', askme_question_time = '{$TimeNow}'");
		$AddQuestion = true;
	}
?>		
Return current item: Prsaar Social Networking Platform