basically, yes.
however, this:
PHP Code:
<?php
if($num_rows >= 80){
echo '<td><font style="font-size:11px" color="Red" face="Arial">CLOSED</td>
<td> </td>';
}
else {
echo '<td><b><font style="font-size:11px" color="Blue" face="Arial">OPEN</b></td>
<td><form action="https://www.payfast.co.za/eng/process" method="post">
<input type="hidden" name="cmd" value="_paynow">
<input type="hidden" name="receiver" value="junior@hayesgolf.co.za">
<input type="hidden" name="item_name" value="Payment - Glendower - Glacier Series">
<input type="hidden" name="item_description" value="payment">
<input type="hidden" name="amount" value="120.00">
<input type="hidden" name="return_url" value="http://www.gnjgf.co.za/entryform.php">
<input type="hidden" name="cancel_url" value="http://www.gnjgf.co.za/Glacier_Main.html">
<input type="submit" style="width:66px;height:20px;background-color:#B5CCE4;font-size:10px; font-family: arial, sans-serif;" value="PAY NOW">
</td>
';
would be more efficient like this:
PHP Code:
$openORclosed = $num_rows >= 80 ? 'CLOSED' : 'OPEN';
echo '<td><font style="font-size:11px" color="Red" face="Arial">'.$openORclosed.'</td>';
if($openORclosed = 'CLOSED'){
echo '<td> </td>';
}else {
echo '
<td><form action="https://www.payfast.co.za/eng/process" method="post">
<input type="hidden" name="cmd" value="_paynow">
<input type="hidden" name="receiver" value="junior@hayesgolf.co.za">
<input type="hidden" name="item_name" value="Payment - Glendower - Glacier Series">
<input type="hidden" name="item_description" value="payment">
<input type="hidden" name="amount" value="120.00">
<input type="hidden" name="return_url" value="http://www.gnjgf.co.za/entryform.php">
<input type="hidden" name="cancel_url" value="http://www.gnjgf.co.za/Glacier_Main.html">
<input type="submit" style="width:66px;height:20px;background-color:#B5CCE4;font-size:10px; font-family: arial, sans-serif;" value="PAY NOW">
</td>
';
(BTW, these pages are dynamic, because PHP is creating them with different values depending on the situation. "static" means they never change.)
Bookmarks