Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-admin/option-block-update.php
<?php
	require_once('./admin.php');
	
	$Action = $_GET['action'];
	
	/* currently no validation and checking, since I'm working hard on the other project saaras [http://vikrant.co.in/feelgood/saaras.html] which I'll use as the form validator.
	Should be finished in two or three days, not more than that
	*/
		
	$BlockName = $_POST['block_name'];
	$BlockValue = $_POST['block_value'];
	$BlockCategory = $_POST['block_category'];
	$BlockStatus = $_POST['block_status'];
		
		
		
	
	if($Action === 'new')
	{		
		$DC->Result("INSERT INTO ".PR_DATABASE_PREFIX."block SET block_name = '$BlockName', block_value = '$BlockValue', block_category = '$BlockCategory', block_status = '$BlockStatus'");
		header("Location: option-block.php?highlight=New_Block_added");
		exit();
	}
	
	elseif($Action === 'update')
	{
		$BlockID = $_GET['id'];
		$DC->Result("UPDATE ".PR_DATABASE_PREFIX."block SET block_name = '$BlockName', block_value = '$BlockValue', block_category = '$BlockCategory', block_status = '$BlockStatus' WHERE block_id = $BlockID");
		header("Location: option-block.php?highlight=Block_updated");
		exit();
	}
		
?>
Return current item: Prsaar Social Networking Platform