Posted by: Sourav | May 2, 2011

Associated php file with the form


<?php
$a=1;
if($_POST[‘pubname’]==””)
{
   
  
   
    if($a==1){
include(“seventh.php”);
$a=$a+1;
 echo “<hr>”;
    }
  
     echo “<font color=’red’>Please enter publisher’s name</font><br />”;
    }

 

if($_POST[‘companyname’]==””)
{
   
  
    if($a==1)
    {
include(“seventh.php”);
$a=$a+1;
echo “<hr>”;
}
 
 echo “<font color=’red’>Please enter company name</font><br />”;
}

if($_POST[‘bookkind’]<>true)
{
   
  
    if($a==1)
    {
include(“seventh.php”);
$a=$a+1;
 echo “<hr>”;
    }
   
     echo “<font color=’red’>please select the type of the book</font><br />”;
    
}
if($_POST[‘location’]<>true)
{
  
   
    if($a==1)
    {
include(“seventh.php”);
$a=$a+1;
echo “<hr>”;
}

 echo “<font color=’red’>please select location</font><br />”;
}
else if(($_POST[‘pubpass’]==””)||(is_numeric($_POST[‘pubpass’])==FAlse))
{
  
   
    if($a==1)
    {
include(“seventh.php”);
$a=$a+1;
echo “<hr>”;
}

 echo “<font color=’red’>please enter numeric publisher code</font><br />”;
}
else
{
     echo “<font color=’blue’>The form name is”. $_POST[‘formname’].”</font><br />”;
      echo “<font color=’green’>Data entered successfully</font>”;
       echo “<hr>”;
       $_POST=””;
    include(“seventh.php”);
   
   
}

?>


Leave a comment

Categories