0

good day everyone,

i just wanted to ask for some help in using block ui for forms.

i have a form with 3 values.

once the form is submitted then block ui will appear with all the information from the form "echoed" within the div.

but the problem is each time i use a submit button, blockui doesn't work and immediately shuts when the form is submitted.

here is a sample of the code i am working with (sorry if it quite long):

block ui javascript

<script type="text/javascript"> 
    $(document).ready(function() { 

        $("#pay").click(function() { 
            $.blockUI({ message: $('#question'), css: { width: '1024px' } }); 
        }); 

        $('#yes').click(function() { 
            // update the block message 
            $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); 

            $.ajax({ 
                url: 'wait.php', 
                cache: false, 
                complete: function() { 
                    // unblock when remote call returns 
                    $.unblockUI(); 
                } 
            }); 
        }); 

        $('#no').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 

    }); 
</script>

block ui

<div id="question" style="display: none; cursor: default; padding: 20px;"> 
        <span style="font-size: 24px; font-weight: bold;">Would you save all changes and print the receipt?</span>
        <p>
        <div style="border: 1px black solid; padding: 20px; width: 175px; margin-left: auto; margin-right: auto;">
        <img src="resources/speedline.png" width="161" height="58" />
        <p>
        DRIVER <?php echo $_GET['id']; ?> RECEIPT
        <br /><span style="font-size:11px">
        <?php
$oBeginDate = new DateTime('last wednesday');
$oEndDate   = new DateTime('next wednesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
?>
        </span>
        <p>  
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left">DATE PAID</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">TOTAL RENT</td>
    <td>£<? echo $_POST['pRent']; ?></td>
  </tr>
  <tr>
    <td align="left">RENT PAID</td>
    <td>£<? echo $_POST['rentPaid']; ?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td align="left">REMAINING</td>
    <td>£<? echo $_POST['result']; ?></td>
  </tr>
</table><br />
<span style="font-size:8px">THANK YOU FOR YOUR PAYMENT. PLEASE KEEP THIS RECEIPT FOR FUTURE REFERENCE. YOU WILL BE ASKED TO PRESENT IT AS EVIDENCE OF PAYMENT MADE.</span>
        </div>
        </p>
        <input type="button" id="yes" value="Save/Print" style="width: 150px; height: 100px;"/> 
        <input type="button" id="no" value="Cancel" style="width: 150px; height: 100px;"/> 
</div>

form

<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
    <table width="99%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="33%">Status</td>
          <td width="33%">Total Rent (£)</td>
          <td width="33%">Rent Paid (£)</td>
        </tr>
        <tr>
          <td><select name="status" style="width: 320px; font-size: 56px;" size="5">
            <option value="vacant" <?php if (!(strcmp("vacant", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>vacant</option>
            <option value="clear" <?php if (!(strcmp("clear", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>clear</option>
            <option value="awaiting" <?php if (!(strcmp("awaiting", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>awaiting</option>
            <option value="paid" <?php if (!(strcmp("paid", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>paid</option>
            <option value="not working" <?php if (!(strcmp("not working", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>not working</option>
          </select></td>
          <td valign="top"><input name="pRent" type="text" id="previousRent" style="height: 60px; width: 200px; font-size: 56px;" value="<?php if ( $row_driver['pRent'] =! 0 ) { echo ""; } else { echo  $row_driver['pRent']; } ?>"/></td>
          <td valign="top"><input type="text" id="rentPaid" name="rentPaid" style="height: 60px; width: 200px; font-size: 56px;"/></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr></form>
        <tr>
          <td>Last Paid On</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><span style="font-size: 56px;">      
    <?php if ( $row_driver['pDate'] =! 0 ) { echo "N/A"; } else { echo  $row_driver['pDate']; } ?>
    </span></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="19">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Remaining (£)</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td valign="top"><input type="text" id="result" name="result" style="border: #FFF; height: 60px; width: 200px; font-size: 56px;" readonly="readonly"/></td>
          <td colspan="2" align="center"><input type="submit" name="pay" id="pay" value="Pay" style="width: 150px; height: 100px;"/>
            <img src="resources/spacer.gif" width="25px" height="1px" />
          <input type="reset" name="reset" id="reset" value="Reset" style="width: 150px; height: 100px;"/>      </td>
        </tr>
        <tr>
          <td><img src="resources/spacer.gif" width="1" height="50px" /></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
    </tr>
  </table>
</form>

any help would be appreciated. much love and God bless!

Edited by methuselah90: n/a

2
Contributors
6
Replies
8
Views
6 Years
Discussion Span
Last Post by methuselah90
1

Hmmm... your code is good.. But, for submit button, we should not write click function... why, Because.. Once, we clicked that button, it first submits the values to the corresponding action page and then only click function will be called.. Here, submitting process is primary.. So, you are unable to do the click function. So, don't use submit button, rather try with normal button.. That JQuery click function will definitely work...

Hope you can understand this.. If still problem occurs, pls let me know...

Edited by Dragonbaki: n/a

0

it works great but the values now do not appear in the div window. am i doing something wrong?

1

If you replaced the submit button to normal button, no datas will be posted.. I think so only this problem... Let i show one example below... Listen carefully, understand and proceed... Surely we will get succeed.... Go through this example from <body> to <head>.. You can easily catch my point...

<html>
<head>
<script type="text/javascript">
<!-- This function just gets the value of the text box 'name1' and assigned to the hidden for text box 'name2'... -->
function valuepassing()
{
var a = document.show.name1.value;
document.hiddenform.name2.value = a;
<!-- This command submits the hidden form... Nothing but what you have done previously with submit button directly... Now you can get the value from 'name2' text box of hidden form through $_POST method and you can populate the datas as usual.....
document.hiddenform.submit();
}
</script>
</head>
<body>

// This is an hidden form which is used to pass values between pages without using submit button....

<form action=" " name="hiddenform" method="post">
<input type="hidden" name="name2" />
</form>

// This is our actual form...
<form name="show">
// This is the value needed to be post....
<input type="text" name="name1" />
// This button will call the valuepassing() function while on click....
<input type="button" value="Pass" onclick="return valuepassing()" />
</form>
</body>
</html>

I hope this example is useful for you and apply this concept to use the entire datas to populate... You can definitely be fulful of joy... If still problem occurs, pls let me know......

0

i really appreciate your help on this brother. i have read through everything and understood your example well and applied it to my page. it still does not work. here is the complete code below with the necessary changes:

<?php require_once('Connections/rent.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_driver = "-1";
if (isset($_GET['id'])) {
  $colname_driver = $_GET['id'];
}
mysql_select_db($database_rent, $rent);
$query_driver = sprintf("SELECT * FROM rent WHERE id = %s", GetSQLValueString($colname_driver, "int"));
$driver = mysql_query($query_driver, $rent) or die(mysql_error());
$row_driver = mysql_fetch_assoc($driver);
$totalRows_driver = mysql_num_rows($driver);

$user = $_GET['user'];
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="resources/css_02.css">
        <style type="text/css">
@import "resources/jquery.keypad.css";
</style>  
<link rel="shortcut icon" href="resources/favicon.ico">
		<script src="resources/jquery.js"></script>     
        <script src="resources/jquery.keypad.js"></script> 
        <script src="resources/blockui.js"></script>   
        <script type="text/javascript"> 
    $(document).ready(function() { 
 
        $("#pay").click(function() { 
            $.blockUI({ message: $('#question'), css: { width: '1024px' } }); 
        }); 
 
        $('#yes').click(function() { 
            // update the block message 
            $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); 
 
            $.ajax({ 
                url: 'wait.php', 
                cache: false, 
                complete: function() { 
                    // unblock when remote call returns 
                    $.unblockUI(); 
                } 
            }); 
        }); 
 
        $('#no').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 
 
    }); 
</script>           
<script type="text/javascript">
$(function () {
	$('#rentPaid').keypad();
	$('#driver').keypad();
	$('#previousRent').keypad();
});
</script>            
  <script>
    $(document).ready(function(){
      $('#previousRent').change(function(){
        calcResult();
      });
      $('#rentPaid').change(function(){
        calcResult();
      });
    });
function calcResult() {
      $('#result').val( parseFloat($('#previousRent').val() - $('#rentPaid').val()) );
    }
  </script>   
<script type="text/javascript">
<!-- This function just gets the value of the text box 'name1' and assigned to the hidden for text box 'name2'... -->
function valuepassing()
{
var a = document.show.status.value;
var b = document.show.pRent.value;
var c = document.show.rentPaid.value;
var d = document.show.pDate.value;
var e = document.show.result.value;
document.hiddenform.status2.value = a;
document.hiddenform.pRent2.value = b;
document.hiddenform.rentPaid2.value = c;
document.hiddenform.name2.value = d;
document.hiddenform.result2.value = e;

<!-- This command submits the hidden form... Nothing but what you have done previously with submit button directly... Now you can get the value from 'name2' text box of hidden form through $_POST method and you can populate the datas as usual.....
document.hiddenform.submit();
}
</script>
<title>Speedy CMS</title>
</head>
<body style="text-align: left;">





		<!-- div -->

<div id="question" style="display: none; cursor: default; padding: 20px;"> 
        <span style="font-size: 24px; font-weight: bold;">Would you like to save all the changes and print the receipt?</span>
        <p>
        <div style="border: 1px black solid; padding: 20px; width: 175px; margin-left: auto; margin-right: auto;">
        <img src="resources/speedline.png" width="161" height="58" />
        <p>
        DRIVER <?php echo $_GET['id']; ?> RECEIPT
        <br /><span style="font-size:11px">
        <?php
$oBeginDate = new DateTime('last wednesday');
$oEndDate   = new DateTime('next wednesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
?>
        </span>
        <p>  
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 12px;">
<tr>
    <td align="left">TOTAL RENT</td>
    <td align="left">£<?php echo $_POST['pRent2']; ?></td>
  </tr>
  <tr>
    <td align="left">RENT PAID</td>
    <td align="left">£<?php echo $_POST['rentPaid2']; ?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td align="left">REMAINING</td>
    <td align="left">£<?php echo $_POST['result2']; ?></td>
  </tr>
</table><br />
<span style="font-size:9px">THANK YOU FOR YOUR PAYMENT. PLEASE KEEP THIS RECEIPT FOR FUTURE REFERENCE. YOU WILL BE ASKED TO PRESENT IT AS EVIDENCE OF PAYMENT MADE.<p>RECEIVED ON <?php echo date("d/m/y H:i a"); ?><p></span>
        </div>
        </p>
        <input type="button" id="yes" value="Save/Print" style="width: 150px; height: 100px;"/> 
        <input type="button" id="no" value="Cancel" style="width: 150px; height: 100px;"/> 
</div>





		<!-- heading -->
        
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
        <td width="68%"><img src="resources/speedline.png" /></td>
        <td width="32%" align="right"><span style="font-size: 12px;"><a href="main.php?user=<?php echo $_GET['user']; ?>" class='login2' style="font-size: 20px;">VIEW SUMMARY</a></span><img src='resources/spacer.gif' alt="" width='50px' height='1px'/><a href="index.php" class='login2' style="font-size: 20px;">LOG OFF</a></td>
  </tr>
</table>
<p>
<span style="font-size: 12px;"><?php echo date("l F d, Y, G:i A") ?><br>
<img src='resources/spacer.gif' width='1px' height='10px'/>
<p style="font-size: 20px;">RENT PAYMENT (<?php echo $_GET['user']; ?> for DRIVER <?php echo $_GET['id']; ?>) 
- <?php
$oBeginDate = new DateTime('last wednesday');
$oEndDate   = new DateTime('next wednesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
?>





		<!-- hidden form -->

<form action=" " name="hiddenform" method="post">
<input type="hidden" name="status2" />
<input type="hidden" name="pRent2" />
<input type="hidden" name="rentPaid2" />
<input type="hidden" name="pDate2" value="<?php echo date("l F d, Y, G:i A") ?>" />
</form>





		<!-- keypad form -->

<form name="show">
  <table width="99%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="33%">Status</td>
      <td width="33%">Total Rent (£)</td>
      <td width="33%">Rent Paid (£)</td>
    </tr>
    <tr>
      <td><select name="status" style="width: 320px; font-size: 56px;" size="5">
        <option value="vacant" <?php if (!(strcmp("vacant", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>vacant</option>
        <option value="clear" <?php if (!(strcmp("clear", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>clear</option>
        <option value="awaiting" <?php if (!(strcmp("awaiting", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>awaiting</option>
        <option value="paid" <?php if (!(strcmp("paid", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>paid</option>
        <option value="not working" <?php if (!(strcmp("not working", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>not working</option>
      </select></td>
      <td valign="top"><input name="pRent" type="text" id="previousRent" style="height: 60px; width: 200px; font-size: 56px;" value="<?php if ( $row_driver['pRent'] == 0 ) { echo ""; } else { echo  $row_driver['pRent']; } ?>"/></td>
      <td valign="top"><input type="text" id="rentPaid" name="rentPaid" style="height: 60px; width: 200px; font-size: 56px;"/></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Last Paid On</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>   
      <input type="text" id="pDate" name="pDate" style="border: #FFF; height: 60px; width: 400px; font-size: 46px;" readonly="readonly" value="<?php if ( $row_driver['pDate'] == 0 ) { echo "N/A"; } else { echo  $row_driver['pDate']; } ?>"/>
      </td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="19">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Remaining (£)</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td valign="top"><input type="text" id="result" name="result" style="border: #FFF; height: 60px; width: 200px; font-size: 56px;" readonly="readonly"/></td>
      <td colspan="2" align="center"><input type="button" name="pay" id="pay" value="Pay" style="width: 150px; height: 100px;" onclick="return valuepassing()"/>
        <img src="resources/spacer.gif" width="25px" height="1px" />
      <input type="reset" name="reset" id="reset" value="Reset" style="width: 150px; height: 100px;"/>      </td>
    </tr>
    <tr>
      <td><img src="resources/spacer.gif" width="1" height="50px" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </form>





		<!-- footer -->

<img src='resources/spacer.gif' width='1px' height='10px'/><img src='resources/spacer.gif' width='1px' height='10px'/><br />
<span class="bottom">&copy; <?php echo date("Y"); ?> Speedline</span>





<?php
mysql_free_result($driver);
?>
0

Hi jeansy... I went through your code.. I have one doubt...
In your posted code.., from line 120 to 124, there are some lines as follows..

document.hiddenform.status2.value = a;
document.hiddenform.pRent2.value = b;
document.hiddenform.rentPaid2.value = c;
document.hiddenform.name2.value = d;
document.hiddenform.result2.value = e;

Based on my idea, these hidden values should be passed through the following hidden form...

<form action=" " name="hiddenform" method="post">
<input type="hidden" name="status2" />
<input type="hidden" name="pRent2" />
<input type="hidden" name="rentPaid2" />
<input type="hidden" name="pDate2" value="<?php echo date("l F d, Y, G:i A") ?>" />
</form>

But see, what about the 'name2' in above code that is having value 'd'...
And, you are passing 5 values to the hidden form.. But hidden form having only 4 hidden boxes...
And, there is no hidden box having name 'result2' that are you are passing from script with value 'e'.

One additional information.., If script having errors in our project, it will never show errors in our browser and never show perfect output... So please check this all and try once again.. You cannot fail...

Please try again., If still any probs, let me know with what you are having error message in your browser.. I am always with you...

0

thank you my good sir! these are the changes i've made. but now the page refreshes to submit the data before blockui (http://jquery.malsup.com/block/#page) is dislayed. i feel this is a part of the submit procedure. so now the values submit but blockui will not show.

<?php require_once('Connections/rent.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_driver = "-1";
if (isset($_GET['id'])) {
  $colname_driver = $_GET['id'];
}
mysql_select_db($database_rent, $rent);
$query_driver = sprintf("SELECT * FROM rent WHERE id = %s", GetSQLValueString($colname_driver, "int"));
$driver = mysql_query($query_driver, $rent) or die(mysql_error());
$row_driver = mysql_fetch_assoc($driver);
$totalRows_driver = mysql_num_rows($driver);

$user = $_GET['user'];
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="resources/css_02.css">
        <style type="text/css">
@import "resources/jquery.keypad.css";
</style>  
<link rel="shortcut icon" href="resources/favicon.ico">
		<script src="resources/jquery.js"></script>     
        <script src="resources/jquery.keypad.js"></script> 
        <script src="resources/blockui.js"></script>   
        <script type="text/javascript"> 
    $(document).ready(function() { 
 
        $("#pay").click(function() { 
            $.blockUI({ message: $('#question'), css: { width: '1024px' } }); 
        }); 
 
        $('#yes').click(function() { 
            // update the block message 
            $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); 
 
            $.ajax({ 
                url: 'wait.php', 
                cache: false, 
                complete: function() { 
                    // unblock when remote call returns 
                    $.unblockUI(); 
                } 
            }); 
        }); 
 
        $('#no').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 
 
    }); 
</script>           
<script type="text/javascript">
$(function () {
	$('#rentPaid').keypad();
	$('#driver').keypad();
	$('#previousRent').keypad();
});
</script>            
  <script>
    $(document).ready(function(){
      $('#previousRent').change(function(){
        calcResult();
      });
      $('#rentPaid').change(function(){
        calcResult();
      });
    });
function calcResult() {
      $('#result').val( parseFloat($('#previousRent').val() - $('#rentPaid').val()) );
    }
  </script>   
<script type="text/javascript">
<!-- This function just gets the value of the text box 'name1' and assigned to the hidden for text box 'name2'... -->
function valuepassing()
{
var a = document.show.status.value;
var b = document.show.pRent.value;
var c = document.show.rentPaid.value;
var d = document.show.pDate.value;
var e = document.show.result.value;
document.hiddenform.status2.value = a;
document.hiddenform.pRent2.value = b;
document.hiddenform.rentPaid2.value = c;
document.hiddenform.pDate2.value = d;
document.hiddenform.result2.value = e;

<!-- This command submits the hidden form... Nothing but what you have done previously with submit button directly... Now you can get the value from 'name2' text box of hidden form through $_POST method and you can populate the datas as usual.....
document.hiddenform.submit();
}
</script>
<title>Speedy CMS</title>
</head>
<body style="text-align: left;">





		<!-- div -->

<div id="question" style="display: none; cursor: default; padding: 20px;"> 
        <span style="font-size: 24px; font-weight: bold;">Would you like to save all the changes and print the receipt?</span>
        <p>
        <div style="border: 1px black solid; padding: 20px; width: 175px; margin-left: auto; margin-right: auto;">
        <img src="resources/speedline.png" width="161" height="58" />
        <p>
        DRIVER <?php echo $_GET['id']; ?> RECEIPT
        <br /><span style="font-size:11px">
        <?php
$oBeginDate = new DateTime('last wednesday');
$oEndDate   = new DateTime('next wednesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
?>
        </span>
        <p>  
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 12px;">
<tr>
    <td align="left">TOTAL RENT</td>
    <td align="left">£<?php echo $_POST['pRent2']; ?></td>
  </tr>
  <tr>
    <td align="left">RENT PAID</td>
    <td align="left">£<?php echo $_POST['rentPaid2']; ?></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td align="left">REMAINING</td>
    <td align="left">£<?php echo $_POST['result2']; ?></td>
  </tr>
</table><br />
<span style="font-size:9px">THANK YOU FOR YOUR PAYMENT. PLEASE KEEP THIS RECEIPT FOR FUTURE REFERENCE. YOU WILL BE ASKED TO PRESENT IT AS EVIDENCE OF PAYMENT MADE.<p>RECEIVED ON <?php echo date("d/m/y H:i a"); ?><p></span>
        </div>
        </p>
        <input type="button" id="yes" value="Save/Print" style="width: 150px; height: 100px;"/> 
        <input type="button" id="no" value="Cancel" style="width: 150px; height: 100px;"/> 
</div>





		<!-- heading -->
        
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
        <td width="68%"><img src="resources/speedline.png" /></td>
        <td width="32%" align="right"><span style="font-size: 12px;"><a href="main.php?user=<?php echo $_GET['user']; ?>" class='login2' style="font-size: 20px;">VIEW SUMMARY</a></span><img src='resources/spacer.gif' alt="" width='50px' height='1px'/><a href="index.php" class='login2' style="font-size: 20px;">LOG OFF</a></td>
  </tr>
</table>
<p>
<span style="font-size: 12px;"><?php echo date("l F d, Y, G:i A") ?><br>
<img src='resources/spacer.gif' width='1px' height='10px'/>
<p style="font-size: 20px;">RENT PAYMENT (<?php echo $_GET['user']; ?> for DRIVER <?php echo $_GET['id']; ?>) 
- <?php
$oBeginDate = new DateTime('last wednesday');
$oEndDate   = new DateTime('next wednesday');
echo $oBeginDate->format('d/m/Y') . ' to ' . $oEndDate->format('d/m/Y');
?>





		<!-- hidden form -->

<form action=" " name="hiddenform" method="post">
<input type="hidden" name="status2" />
<input type="hidden" name="pRent2" />
<input type="hidden" name="rentPaid2" />
<input type="hidden" name="result2" />
<input type="hidden" name="pDate2" value="<?php echo date("l F d, Y, G:i A") ?>" />
</form>





		<!-- keypad form -->

<form name="show">
  <table width="99%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="33%">Status</td>
      <td width="33%">Total Rent (£)</td>
      <td width="33%">Rent Paid (£)</td>
    </tr>
    <tr>
      <td><select name="status" style="width: 320px; font-size: 56px;" size="5">
        <option value="vacant" <?php if (!(strcmp("vacant", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>vacant</option>
        <option value="clear" <?php if (!(strcmp("clear", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>clear</option>
        <option value="awaiting" <?php if (!(strcmp("awaiting", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>awaiting</option>
        <option value="paid" <?php if (!(strcmp("paid", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>paid</option>
        <option value="not working" <?php if (!(strcmp("not working", $row_driver['status']))) {echo "selected=\"selected\"";} ?>>not working</option>
      </select></td>
      <td valign="top"><input name="pRent" type="text" id="previousRent" style="height: 60px; width: 200px; font-size: 56px;" value="<?php if ( $row_driver['pRent'] == 0 ) { echo ""; } else { echo  $row_driver['pRent']; } ?>"/></td>
      <td valign="top"><input type="text" id="rentPaid" name="rentPaid" style="height: 60px; width: 200px; font-size: 56px;"/></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Last Paid On</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>   
      <input type="text" id="pDate" name="pDate" style="border: #FFF; height: 60px; width: 400px; font-size: 46px;" readonly="readonly" value="<?php if ( $row_driver['pDate'] == 0 ) { echo "N/A"; } else { echo  $row_driver['pDate']; } ?>"/>
      </td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="19">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Remaining (£)</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td valign="top"><input type="text" id="result" name="result" style="border: #FFF; height: 60px; width: 200px; font-size: 56px;" readonly="readonly"/></td>
      <td colspan="2" align="center"><input type="button" name="pay" id="pay" value="Pay" style="width: 150px; height: 100px;" onclick="return valuepassing()"/>
        <img src="resources/spacer.gif" width="25px" height="1px" />
      <input type="reset" name="reset" id="reset" value="Reset" style="width: 150px; height: 100px;"/>      </td>
    </tr>
    <tr>
      <td><img src="resources/spacer.gif" width="1" height="50px" /></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </form>





		<!-- footer -->

<img src='resources/spacer.gif' width='1px' height='10px'/><img src='resources/spacer.gif' width='1px' height='10px'/><br />
<span class="bottom">&copy; <?php echo date("Y"); ?> Speedline</span>





<?php
mysql_free_result($driver);
?>
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.