Forum Moderators: coopster
<?php
if (isset($_POST['enviar2'])) {
if (empty($bookingway)) {
echo "<span class='style2'>Please choose instant booking or send enquirer and click on send again</span>";
}//if empty
else{
if ($bookingway=="instant"){
echo "instant";
}//if instant
if ($bookingway=="enquirer"){
echo "enquirer";
if (isset($_POST['enviar']))
{echo "OK"; }
?><form action="<?php echo $_SERVER['SCRIPT_NAME'];?>" method="post" name="bookingways" id="bookingways">
<p align="center"><input class="boton" type="submit" name="enviar" value="Send"> </p>
</form>
<?php }//if enquirer
}//else
}//if enviar2
else {?>
<form action="<?php echo $_SERVER['SCRIPT_NAME'];?>" method="post" name="bookingways" id="bookingways" onSubmit="return validate_form2 ( );">
<input type="hidden" name="propiedad" value="<?php print $propiedad;?>">
<p class="bookingway">
<input name="bookingway" type="radio" value="instant">Instant booking (I have read terms and conditions).<br>
<input name="bookingway" type="radio" value="enquirer">Send enquirer or book by email.
</p>
<p align="center"><input class="boton" type="submit" name="enviar2" value="Send"> </p>
<?php
} if(isset($_POST['enviar'])) { echo "OK"; } if(isset($_POST['enviar2'])){ name="enviar2"). name="enviar") is then inside that loop. so if(isset($_POST['enviar'])) { echo "OK"; }
<?php
if (isset($_POST['enviar']))
{echo "OK"; }
if (isset($_POST['enviar2'])) {
if (empty($bookingway)) {
echo "<span class='style2'>Please choose instant booking or send enquirer and click on send again</span>";
}//if empty
else{
if ($bookingway=="instant"){
echo "instant";
}//if instant
if ($bookingway=="enquirer"){
echo "enquirer";
?><form action="<?php echo $_SERVER['SCRIPT_NAME'];?>" method="post" name="bookingways" id="bookingways">
<p align="center"><input class="boton" type="submit" name="enviar" value="Send"> </p>
</form>
<?php
}//if enquirer
}//else
}//if enviar2
else{?> <form action="<?php echo $_SERVER['SCRIPT_NAME'];?>" method="post" name="bookingways" id="bookingways" onSubmit="return validate_form2 ( );">
<p class="bookingway">
<input name="bookingway" type="radio" value="instant">Instant booking <br>
<input name="bookingway" type="radio" value="enquirer">Send enquirer or book by email.
</p>
<p align="center"><input class="boton" type="submit" name="enviar2" value="Send"> </p>
</form>