0
<?php

// Database Connection
require_once("condition.php");
$host="localhost";
$uname="root";
$pass="";
$database = "data"; 

$connection=mysql_connect($host,$uname,$pass); 

echo mysql_error();

//or die("Database Connection Failed");
$selectdb=mysql_select_db($database) or 
die("Database could not be selected"); 
$result=mysql_select_db($database)
or die("database cannot be selected <br>");
$projno=$_POST['parameters'];
function IsChecked($chkname,$value)
    {
        if(!empty($_POST[$chkname]))
        {
            foreach($_POST[$chkname] as $chkval)
            {
                if($chkval == $value)
                {
                    return true;
                }
            }
        }
        return false;
    }


if (isset($_POST['parameters']) && (isset($_POST['chkbox1'])) && (isset($_POST['fileformat'])))  {
 $query = "SELECT DISTINCT INODC_PR_N FROM chemical";
 $result = mysql_query ($query);
while( $r = mysql_fetch_array($result)){
 if( ($_POST['parameters'] == $r['INODC_PR_N'])){
$checked = $_POST['chkbox1'];
foreach ($checked as $chk) {
    switch ($chk) {
        case 'chemical' :

            // do something here
            chemical();
            break;
        case 'physical' :
            // do something here
            physical();
            break;
        case 'pollution1' :
            // do something here
            pollution1();
            break;
              case 'pollution2' :
            // do something here
            pollution2();
            break;
        default :
            echo "ERROR";
            break;
    }
}


}
}
}



?>




<?php

// Database Connection
require_once("condition.php");
$host="localhost";
$uname="root";
$pass="";
$database = "data"; 

$connection=mysql_connect($host,$uname,$pass); 

echo mysql_error();

//or die("Database Connection Failed");
$selectdb=mysql_select_db($database) or 
die("Database could not be selected"); 
$result=mysql_select_db($database)
or die("database cannot be selected <br>");
$projno=$_POST['parameters'];
function IsChecked($chkname,$value)
    {
        if(!empty($_POST[$chkname]))
        {
            foreach($_POST[$chkname] as $chkval)
            {
                if($chkval == $value)
                {
                    return true;
                }
            }
        }
        return false;
    }


if (isset($_POST['parameters']) && (isset($_POST['chkbox1'])) && (isset($_POST['fileformat'])))  {
 $query = "SELECT DISTINCT INODC_PR_N FROM chemical";
 $result = mysql_query ($query);
while( $r = mysql_fetch_array($result)){
 if( ($_POST['parameters'] == $r['INODC_PR_N'])){
$checked = $_POST['chkbox1'];
foreach ($checked as $chk) {
    switch ($chk) {
        case 'chemical' :

            // do something here
            chemical();
            break;
        case 'physical' :
            // do something here
            physical();
            break;
        case 'pollution1' :
            // do something here
            pollution1();
            break;
              case 'pollution2' :
            // do something here
            pollution2();
            break;
        default :
            echo "ERROR";
            break;
    }
}


}
}
}



?>
2
Contributors
3
Replies
11
Views
3 Years
Discussion Span
Last Post by shehnaz20
0

when 4 check box are checked 4 files should be downloaded simultaneously

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.