Link to home
Start Free TrialLog in
Avatar of Akhil Vinay Mandava
Akhil Vinay MandavaFlag for India

asked on

PHP For Loop help

for loop is not working for me in php i tried a lot for this can any one please check my code.i need send education details like qualifiction,years,university,percent into php table
for($i=1;$i<=4;$i++){

$qa="Qualification"+$i;

$Qualification = "";
if(isset($_POST['Qualification1'+$i])){
    $Qualification = $_POST['Qualification'.$i];
 }  
 echo"-----------";
echo $Qualification;
$Years= "";
if(isset($_POST['Years'+$i])){
    $Years = $_POST['Years'+$i];
 } 

$University = "";
if(isset($_POST['University'+$i])){
    $University = $_POST['University'+$i];
 } 

$Percentage = "";
if(isset($_POST['Percentage'+$i])){
    $Percentage = $_POST['Percentage'+$i];
 } 

echo"222222222";
echo $Qualification;
if($Qualification != null){
    echo "333333333";

 $qry = "INSERT INTO emp_qualification(EmployeeID,Qualification,Years,University,Percentage)
        VALUES('$EmployeeID','$Qualification','$Years','$University','$Percentage')";

        if ($conn->query($qry)==TRUE){
        echo " qulaification details added successfully";
    }
    else 
        echo "<br/> not added.";

}
}

Open in new window

Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

What  errors do you have?
Avatar of Akhil Vinay Mandava

ASKER

i solved that errors
Then what is the problem if you have solve the errors!!!!!
ASKER CERTIFIED SOLUTION
Avatar of Akhil Vinay Mandava
Akhil Vinay Mandava
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i want like a calander type only
nothing