Location: PHPKode > projects > Decider > decider/Initial_Quiz/deletequiz.php
<?php
$user = "root";
 $pass = "";
 $db = "deciderdb";
 $link = mysql_connect( "localhost", $user, $pass );
 if ( ! $link ) {
   die( "Couldn't connect to MySQL: ".mysql_error() ); }


 //require("../common/database.php");
 //if ( ! $link ) {
 //die( "Couldn't connect to MySQL: ".mysql_error() ); }

mysql_select_db( $db, $link )
  or die ( "Couldn't open $db: ".mysql_error() );

if (isset($_GET['q_id'])) {
	//Add slashes to any quotes to avoid SQL problems.
	echo "php called";
	$q_id = addslashes($_GET['q_id']);
	
	//Get every page title for the site.
	$query="DELETE FROM initial_quiz where Id='".$q_id."'";
	//"DELETE FROM analyser WHERE Id='$_POST[analyst_id]'";
	if (!mysql_query($query,$link))
	  {
	  die('Error: ' . mysql_error());
	  }
			 
	echo "1 record deleted";
	
	mysql_close($link);
	
	
}
	
	

?>
Return current item: Decider