Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Confused in using if condition (http://www.go4expert.com/forums/confused-using-condition-t24308/)

newphpcoder 29Dec2010 14:28

Confused in using if condition
 
Good day!

I have a problem in if and else condition to know if the cloth type is NW (AAA or BBB or CCC) and W the rest cloth type that did not listed in NW. My code did not read the code for NW, only W was read so that even the cloth type is NW the formula was used is the formula of W. I don’t know what is wrong in my code so that if the cloth type is NW the formula is $CLT_yield = @($output / ($input * 8.8)) * 100; and if W the formula is $CLT_yield = @($output / ($input * 9)) * 100;

In my code only the code $CLT_yield = @($output / ($input * 9)) * 100; was run even the cloth type is CCC.

Here is my code:
PHP Code:

<?php
  
<?php
  
<?php
include 'config.php';
if(
$_POST["clt_date"])
        {
        
$query "SELECT clt_no FROM clt_transact WHERE clt_date = '" $_POST["clt_date"] . "'";
        
$result_loop mysql_query($query);
        
        
$date $_POST["clt_date"];
                
        if(
$result_loop) if(mysql_num_rows($result_loop) > 0)
            {
            
$totalloop mysql_num_rows($result_loop);
            
            
$clt_no mysql_result($result_loop,0,"clt_no");
            
$query "SELECT d.operation_name, SUM(d.input_qty) AS inputqty, d.input_unit, SUM(d.output_qty) AS outputqty, d.output_unit FROM clt_traceability d, clt_transact t WHERE t.clt_no = '$clt_no' AND d.clt_transact_id = t.clt_transact_id AND d.operation_name IN ('Total1', 'Total2', 'Operation3', 'Operation4', 'Operation5')GROUP BY d.operation_name, d.output_unit, d.input_unit ORDER BY d.operation_name";
            
$result mysql_query($query);
            if(
$result)
                {
                echo 
"<table cellspacing='2' style='font-family: arial narrow; font-size: 12px; border-width: 2px 2px 2px 2px; border-style: solid;'>";
                
                echo 
"<tr>";
                echo 
"<tr><b> Date: &nbsp;  " $date "</b></tr>";
                echo 
"<th class='tdclass'>CLT #</th>";
                
$total_row mysql_num_rows($result);
                for(
$ctr=0$ctr $total_row$ctr++)
                    {
                    
$opname mysql_result($result,$ctr,"operation_name");
                    
$i strpos($opname," ",0);
                    
$opname substr($opname,$i);
                    echo 
"<th colspan='2' class='tdclass'>" $opname "<br />(" mysql_result($result,$ctr,"output_unit") . ")</th>";
                    }
                echo 
"<th class='tdclass'>CLT Yield</th>";
                echo 
"</tr>";
                
                echo 
"<tr>";
                echo 
"<td class='tdclass'></td>";
                
                for(
$ctr=0$ctr $total_row$ctr++)
                    {
                    
                    echo 
"<td class='tdclass'>Input</td>";
                    echo 
"<td class='tdclass'>Output</td>";
                    
                    }
                
                echo 
"<td class='tdclass'>";
                echo 
"</td>";
                    
                echo 
"</tr>";
                        
                }
            }
        
        
$query "SELECT clt_no FROM clt_transact WHERE clt_date = '" $_POST["clt_date"] . "' ORDER BY clt_no ASC";
        
$result_loop mysql_query($query);               
        while(
$row mysql_fetch_array($result_loop))
            {
            
$loopctr += 1;
            
$clt_no $row["clt_no"];
            
$query "SELECT * FROM clt_transact WHERE clt_no = '$clt_no'";
            
$result_no mysql_query($query);
            if(
$result_no)
                {
                if(
mysql_num_rows($result_no) > 0)
                    {
                    
                    
$input 0;
                    
$output 0;
                    
                    
///Non-W////
                    
                    
$query  "SELECT SUM(t.input_qty) AS input FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.cloth_type IN ('AAA', 'BBB', 'CCC') AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$input mysql_result($resultyield,0,"input");
                        }
                    
                    
$query  "SELECT SUM(t.output_qty) AS output FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND p.cloth_type IN ('AAA', 'BBB', 'CCC') AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$output mysql_result($resultyield,0,"output");
                        }
                        
                    
$CLT_yield = @($output / ($input 8.8)) * 100;
                    
                    
///W////
                    
                    
$query  "SELECT SUM(t.input_qty) AS input FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$input mysql_result($resultyield,0,"input");
                        }
                    
                    
$query  "SELECT SUM(t.output_qty) AS output FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$output mysql_result($resultyield,0,"output");
                        }
                        
                    
$CLT_yield = @($output / ($input 9)) * 100;
                     
                   
$query "SELECT d.operation_name, SUM(d.input_qty) AS inputqty, d.input_unit, SUM(d.output_qty) AS outputqty, d.output_unit FROM clt_traceability d, clt_transact t WHERE t.clt_no = '$clt_no' AND d.clt_transact_id = t.clt_transact_id AND d.operation_name IN ('Total1', 'Total2', 'Operation3', 'Operation4', 'Operation5') GROUP BY d.operation_name, d.output_unit, d.input_unit ORDER BY d.operation_name";
                    
$result mysql_query($query);
                    if(
$result)
                        {
                       
                        
                        echo 
"<tr>";
                        echo 
"<td><strong>$clt_no</strong></td>";
                        
                        for(
$ctr=0$ctr $total_row$ctr++)
                          {
                            echo 
"<td class='tdclass'>";
                            echo 
number_format((mysql_result($result,$ctr,"inputqty")),2);  
                            
                            echo 
"</td>";
                            echo 
"<td class='tdclass'>";
                            echo 
number_format((mysql_result($result,$ctr,"outputqty")),2); 
                            
                            echo 
"</td>";
                          } 
                            
                        echo 
"<td class='tdclass'><strong>";
                        
printf ("%01.2f"$CLT_yield);
                         echo 
"%</strong></td>";
                     
                        echo 
"</tr>";
                        
                    
                        }
                    }
                }
            }
            echo 
"</table>";              
            }
?>

I hope somebody can help me.

Any help is highly appreciated.

Thank you

pein87 30Dec2010 01:50

Re: Confused in using if condition
 
From what I can see your using if($result_loop) if(mysql_num_rows($result_loop) > 0) which you should not do instead use ||(OR), &&(AND) for multiple conditions in your if statements

example:

PHP Code:

<?php
$myVar 
1;

$gt 0;

if (
$myVar != "" AND $myVar $gt)
{

echo 
"my variable is not blank and is greater than 0";

}
else
{
// both conditions were not met trigger error

echo "variable is either blank or is less than 0";

}
?>

The above would say "my variable is not blank and is greater than 0". The reason is anytime you use either && or AND it will check to make sure both conditions are met and if they are not it will execute the code in the else or else if statement and if you have neither the code will terminate because not other conditions were added. If you use || or OR it will check to see if one of the conditions are met and if so execute the code but if none of the conditions are met it will move to the else if or else statements or terminate the process.

newphpcoder 3Jan2011 11:50

Re: Confused in using if condition
 
I try new code like this:

PHP Code:

$query "SELECT cloth_type FROM clt_transact WHERE cloth_type IN('AAA', 'BBB', 'CCC')";
                      
$result mysql_query($query);
                      
//$cloth_type = $result['cloth_type'];
                      
if($result){
                            
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                                 }
                      else{
                            
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                          } 

To test if the two formula was work i have data that the cloth type is AAA and I have data that the cloth type is DDD and when I run my code only the first formula was work even the cloth type is DDD. I don't know why the else condition did not work in cloth type DDD.why the formula in AAA was work in the DDD cloth type. I mean only this formula:$CLT_yield = @($clicking_output / ($spreading_input * 8.8)) * 100; was work in both AAA and DDD.

Thank you

pein87 4Jan2011 06:03

Re: Confused in using if condition
 
Why are you using the @ symbol that is for error suppression. Where are the variables $clicking_output and $spreading_input? Your trying to multiple values that do not exist. Try this. Also what is the math supposed to be doing? normally math is left to right with anything inside () being done first.

PHP Code:

<?php

function querySuccessful($query
{
    
    if(!
$query)
    {
        
        return 
false;    
        
    }
    else
    {
        
        return 
true;    
        
    }
    
}

$Q "SELECT DISTINCT cloth_type AS type FROM clt_transact"// we only want the three values or how ever many distinct values exist
$runQ = @mysql_query($Q);

if(
querySuccessful($runQ))// query ran ok check if anything has been returned now
{

 if(@
mysql_num_rows($runQ) > 0// make cloth types an associative array
{

$cloth = @mysql_fetch_assoc($runQ); // creates an associative array

foreach($cloth AS $clothTypes)
{

if(
$clothTypes == "AAA")
{

// math here

//insert into db code here

}
else if(
$cloth[type] == "DDD")
{

//math here

//insert into db code here

}

}

}

}
else
{

// query did not run show error

}

?>


newphpcoder 4Jan2011 06:11

Re: Confused in using if condition
 
this is my full code for getting the CLT Yield:

PHP Code:

<?php
include 'config.php';
$query "SELECT * FROM clt_transact WHERE clt_no = '$clt_no'";
            
$result_no mysql_query($query);
            if(
$result_no)
                {
                if(
mysql_num_rows($result_no) > 0)
                    {
                    
                    
$spreading_input 0;
                    
$clicking_output 0;
                    
                    
$query  "SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$spreading_input mysql_result($resultyield,0,"spreading_input");
                        }
                    
                    
$query  "SELECT SUM(t.output_qty) AS clicking_output FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND  p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$clicking_output mysql_result($resultyield,0,"clicking_output");
                        }
                        
                          
                        
                      
$query  "SELECT cloth_type FROM clt_transact WHERE cloth_type IN ('AAA', 'BBB', 'CCC')";
                       
$record mysql_query($query);
                       
$result mysql_fetch_assoc($record);
                       
$cloth_type $result['cloth_type']; 
                       if (
$cloth_type == 'AAA' || $cloth_type == 'BBB' || $cloth_type == 'CCC') {
                        
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                        }     
                       else {
                        
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                        }
?>


pein87 4Jan2011 06:16

Re: Confused in using if condition
 
I'll brb I have to go to the store could you post your mysql table so I can test the code to make sure what I give you works. I spotted an error really fast what your using a variable in a query you need to add it like so

$Q = "SELECT * FROM clt_transact WHERE cloth_type = '".$cloth_type."'";

its single quote, double quote, period, variable, period, double quote, single quote or ' " . $myVar . " ' (minus the spaces).

newphpcoder 4Jan2011 06:28

Re: Confused in using if condition
 
What do you mean mysql table?

here is my full code:
PHP Code:

<?php
if($_POST["clt_date"])
        {
        
$query "SELECT clt_no FROM clt_transact WHERE clt_date = '" $_POST["clt_date"] . "'";
        
$result_loop mysql_query($query);
        
        
$date $_POST["clt_date"];
        
        if(
$result_loop) if(mysql_num_rows($result_loop) > 0)
            {
            
$totalloop mysql_num_rows($result_loop);
            
            
$clt_no mysql_result($result_loop,0,"clt_no");
            
$query "SELECT d.operation_name, SUM(d.input_qty) AS inputqty, d.input_unit, SUM(d.output_qty) AS outputqty, d.output_unit FROM clt_traceability d, clt_transact t WHERE t.clt_no = '$clt_no' AND d.clt_transact_id = t.clt_transact_id AND d.operation_name IN ('Total1', 'Total2', 'Pack', 'Brush', 'Dip')GROUP BY d.operation_name, d.output_unit, d.input_unit ORDER BY d.operation_name";
            
$result mysql_query($query);
            if(
$result)
                {
                echo 
"<table cellspacing='2' style='font-family: arial narrow; font-size: 12px; border-width: 2px 2px 2px 2px; border-style: solid;'>";
                
                echo 
"<tr>";
                echo 
"<tr><b> Date: &nbsp;  " $date "</b></tr>";
                echo 
"<th class='tdclass'>CLT #</th>";
                
$total_row mysql_num_rows($result);
                for(
$ctr=0$ctr $total_row$ctr++)
                    {
                    
$opname mysql_result($result,$ctr,"operation_name");
                    
$i strpos($opname," ",0);
                    
$opname substr($opname,$i);
                    echo 
"<th colspan='2' class='tdclass'>" $opname "<br />(" mysql_result($result,$ctr,"output_unit") . ")</th>";
                    }
                echo 
"<th class='tdclass'>CLT Yield</th>";
                echo 
"</tr>";
                
                echo 
"<tr>";
                echo 
"<td class='tdclass'></td>";
                
                for(
$ctr=0$ctr $total_row$ctr++)
                    {
                    
                    echo 
"<td class='tdclass'>Input</td>";
                    echo 
"<td class='tdclass'>Output</td>";
                    
                    }
                
                echo 
"<td class='tdclass'>";
                echo 
"</td>";
                    
                echo 
"</tr>";
                        
                }
            }
        
        
$query "SELECT clt_no FROM clt_transact WHERE clt_date = '" $_POST["clt_date"] . "' ORDER BY clt_no ASC";
        
$result_loop mysql_query($query);               
        while(
$row mysql_fetch_array($result_loop))
            {
            
$loopctr += 1;
            
$clt_no $row["clt_no"];
            
$query "SELECT * FROM clt_transact WHERE clt_no = '$clt_no'";
            
$result_no mysql_query($query);
            if(
$result_no)
                {
                if(
mysql_num_rows($result_no) > 0)
                    {
                    
                    
$spreading_input 0;
                    
$clicking_output 0;
                    
                    
$query  "SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$spreading_input mysql_result($resultyield,0,"spreading_input");
                        }
                    
                    
$query  "SELECT SUM(t.output_qty) AS clicking_output FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND  p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$clicking_output mysql_result($resultyield,0,"clicking_output");
                        }
                        
$query  "SELECT cloth_type FROM clt_transact WHERE cloth_type IN ('AAA', 'BBB', 'CCC')";
                       
$record mysql_query($query);
                       
$result mysql_fetch_assoc($record);
                       
$cloth_type $result['cloth_type']; 
                       if (
$cloth_type == 'AAA' || $cloth_type == 'BBB' || $cloth_type == 'CCC') {
                        
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                        }     
                       else {
                        
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                        }    
                          
                        
                   
$query "SELECT d.operation_name, SUM(d.input_qty) AS inputqty, d.input_unit, SUM(d.output_qty) AS outputqty, d.output_unit FROM clt_traceability d, clt_transact t WHERE t.clt_no = '$clt_no' AND d.clt_transact_id = t.clt_transact_id AND d.operation_name IN ('Total1', 'Total2', 'Pack', 'Brush', 'Dip') GROUP BY d.operation_name, d.output_unit, d.input_unit ORDER BY d.operation_name";
                    
$result mysql_query($query);
                    if(
$result)
                        {
                       
                        
                        echo 
"<tr>";
                        echo 
"<td><strong>$clt_no</strong></td>";
                        
                        for(
$ctr=0$ctr $total_row$ctr++)
                          {
                            echo 
"<td class='tdclass'>";
                            echo 
number_format((mysql_result($result,$ctr,"inputqty")),2);  
                            
                            echo 
"</td>";
                            echo 
"<td class='tdclass'>";
                            echo 
number_format((mysql_result($result,$ctr,"outputqty")),2); 
                            
                            echo 
"</td>";
                          } 
                            
                        echo 
"<td class='tdclass'><strong>";
                        
printf ("%01.2f"$CLT_yield);
                         echo 
"%</strong></td>";
                     
                        echo 
"</tr>";
                    
                        }
                    }
                }
             
            }
               echo 
"</table>";          
            }
?>

I have inserted 2 data in my database I have AAA and DDD cloth type to test the if and else condition.

Thank you

pein87 4Jan2011 10:59

Re: Confused in using if condition
 
Ok let me ask what are you trying to do code wise? Your getting data from the database but not using that data at all in your first post.

Your also using
PHP Code:

include'config.php'

This is the wrong way to do it because include is a built in function you need the (). the correct way is
PHP Code:

include('config.php'); // include back end 

I suggest that you comment your code to so you know what your trying to do and also use a IDE so you have syntax highlighting so you know if your making a mistake in your code.

Code Lobster is a free IDE that is pretty good http://www.codelobster.com/

Also your first script will not work because your missing the last two }}, if you add them it will close off the two starting if statements your using.

Why are you using the SUM aggregate function for in your queries? You use this to get the total of all specified columns(adds the values of all of the together). Only use this if your trying to figure out your total amount earned or something along those lines plus your using the old join method to when your only selection one value you should not use a join either old fashioned or new fashions(declare it as a join)
This query does not make sense to me because its only selecting one value from one table but joins it with another table which has nothing being selected for return

Code:

SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability AS t, clt_transact AS p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '".$clt_no."'
The above should just be

Code:

SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability AS t
The reason is that your only selecting this value from this table and no data is selected from the joined table which is a waste of resources because the data is not being used.

If you want to get the total number of rows use the COUNT function instead
Code:

SELECT COUNT(*) FROM clt_transact
Are you trying to get the percentage on this or something?Use a function instead of rewriting the code over and over again.

percentage function excepts additional parameter for rounding and by default rounds
PHP Code:

function percentage($origVal,$newVal,$round="true")
{

$percent = ($newVal $origVal) * 100;

// check if round is false dont round
if($round == "true")
{

return 
round($percent);


}
else
{

return 
$percent;

}



This is the fixed script so that the syntax is correct but I did not adjust the code so that it works because I would like to know what your trying to get done code wise so I can help you get to that point once you tell me what it is your trying to do.

PHP Code:

<?php

/* include is a function so you need to use include('page.php'); and not include'page.php'; */

include('config.php');// include backend for database connection

$query "SELECT * FROM clt_transact WHERE clt_no = '".$clt_no."'";

$result_no mysql_query($query);

if(
$result_no)
{
    if(
mysql_num_rows($result_no) > 0// rows were returned from database
    
{
                    
        
$spreading_input 0;
        
$clicking_output 0;
                    
        
$query  "SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability AS t, clt_transact AS p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '".$clt_no."'";
        
$resultyield mysql_query($query);
         if(
$resultyield)
        {
            
            if(
mysql_num_rows($resultyield) > 0)
            {
                
                
$spreading_input mysql_result($resultyield,0,"spreading_input");
                
            }
        
        }
                    
        
$query  "SELECT SUM(t.output_qty) AS clicking_output FROM clt_traceability AS t, clt_transact AS p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND  p.clt_no = '$clt_no'";
        
        
$resultyield mysql_query($query);
        
        if(
$resultyield)
         {
         
             if(
mysql_num_rows($resultyield) > 0)
            {
                
                
$clicking_output mysql_result($resultyield,0,"clicking_output");
                
            }
         
         }
                          
         
$query  "SELECT cloth_type FROM clt_transact WHERE cloth_type IN ('AAA', 'BBB', 'CCC')";
         
         
$record mysql_query($query);
         
         
$result mysql_fetch_assoc($record);
         
         
$cloth_type $result['cloth_type'];
          
         if (
$cloth_type == 'AAA' || $cloth_type == 'BBB' || $cloth_type == 'CCC'
         {
             
             
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                        
         }     
         else 
         {
             
             
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                        
         }
         
    }
    
}
?>

Post what it is your trying to do so I can help you from there so your code will be cleaner with less lines of code.

rameshb 4Jan2011 12:10

Re: Confused in using if condition
 
PHP Code:

<?php
include 'config.php';
$query "SELECT * FROM clt_transact WHERE clt_no = '$clt_no'";
            
$result_no mysql_query($query);
            if(
$result_no)
                {
                if(
mysql_num_rows($result_no) > 0)
                    {
                    
                    
$spreading_input 0;
                    
$clicking_output 0;
                    
                    
$query  "SELECT SUM(t.input_qty) AS spreading_input FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total1' AND p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$spreading_input mysql_result($resultyield,0,"spreading_input");
                        }
                    
                    
$query  "SELECT SUM(t.output_qty) AS clicking_output FROM clt_traceability t, clt_transact p WHERE t.clt_transact_id = p.clt_transact_id AND t.operation_name='Total2' AND  p.clt_no = '$clt_no'";
                    
$resultyield mysql_query($query);
                    if(
$resultyield)
                        {
                        if(
mysql_num_rows($resultyield) > 0$clicking_output mysql_result($resultyield,0,"clicking_output");
                        }
                        
                          
                        
                      
$query  "SELECT cloth_type FROM clt_transact WHERE cloth_type IN ('AAA', 'BBB', 'CCC')";
                       
$record mysql_query($query);
                       
$result mysql_fetch_assoc($record);
                       
$cloth_type $result['cloth_type']; 
                       if (
$cloth_type == 'AAA' || $cloth_type == 'BBB' || $cloth_type == 'CCC') {
                        
$CLT_yield = @($clicking_output / ($spreading_input 8.8)) * 100;
                        }     
                       else {
                        
$CLT_yield = @($clicking_output / ($spreading_input 9)) * 100;
                        }
?>


newphpcoder 4Jan2011 15:09

Re: Confused in using if condition
 
I tried the code that you gave and nothing has changed. I don't know why the if condition only that was work.

Thank you


All times are GMT +5.5. The time now is 01:54.