PHP in HTML code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An HTML/PHP code migrated to a different hosting platform seems to behave differently. The PHP statements within HTML fields or within tables does not execute

PHP within table:

<tr>
<td align="left"><?="&laquo;".$_SESSION['scripture_text']."&raquo;"?></td>
</tr>

This PHP code doesn't print in the HTML page.

PHP within form field:

<input type="text" name="reservation_date" value="<?=$_GET['rdate'];?>" readonly="">

This PHP code shows on the page when it shouldn't. The same variable is an input and an output in this form:

********************************************

<form name="frm" method="post" action="ins_reservation.php" onsubmit="return (submitonce(this) && doValidate(this));">
   <table border="0" width="100%" align="center">
    <tr>
     <td valign="top" width="23%">
      <strong>Your Pledge For:</strong></strong></td>
     <td width="75%">
      <p>
      <?php if($_POST['reservation_date'] != "") { ?>
<input type="text" name="reservation_date" value="<?=$_POST['reservation_date'];?>" readonly="">
      <?php }else {  ?>
<input type="text" name="reservation_date" value="<?=$_GET['rdate'];?>" readonly="">
      <?php } ?>

&nbsp;<img src="images/cal.gif" onclick="cal17.select(document.forms[0].reservation_date,'anchor17','MM/dd/yyyy'); return false;" name="anchor17" id="anchor17">
      <!--<td width="1%">-->
       <?php require("calendar/make_update_calendar.php"); ?>
      </p>

<?php if ($totalRows_findme == 0 && $_GET['email'] != "") { // Show if recordset empty ?> <span class="style1">Not found. Please enter info</span> <?php } // Show if recordset empty ?></td>
     </tr>
   </table>

   <table border="0" width="100%" align="center">
<?php if ($totalRows_findme == 0) { // Show if recordset empty ?>
                <tr>
<td class="st1">Email:<span style="color: #CC0000;">*</span></td> <td class="st1"><input name="email" type="text" class="v_email" id="email" value="<?=$_GET['email'];?>" />
                    <span style="padding-left: 3px;">
<input type="button" name="button" id="button" value="Get my Information" onclick="getacctt()" />
                    </span></td>
             </tr>
             <tr>
<td width="34%" class="st1"> First Name:<span style="color: #CC0000;">*</span> </td> <td width="66%" class="st1"><input name="first_name" type="text" class="v_required" value="<?=$_GET['fname'];?>" /></td>
                 </tr>
                 <tr>
<td class="st1">Last Name:<span style="color: #CC0000;">*</span></td>

*******************************************

Are there times when the <? statements in HTML code don't execute?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux