1
Mestophales
Quick Question

The following code was pasted into a custom block and PHP Script was selected from the dropdown no results displayed,
If I choose the HTML option the preview window actually displays results, but when submitted I get the actual code and not the desired result:

Why do you think that is?

<?PHP
 $db
="MySQL2000Server"
 
$conn= new COM('ADODB.Connection'); 
 
$conn->Open("driver={SQL Server};SERVER=MySQL2000Server;DATABASE=MyDatabaseName;UID=MyUserID;PWD=MyPassword;"); 
 
$MySQL "SELECT * from tblData"
 
$rs $conn->Execute($MySQL); 
?>
<p>&nbsp;</p>
  <p>&nbsp;</p>
<table width="323" height="151" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CCCCCC"> 
    <td width="153" height="151"> 
      <p align="left"><b><font color="#525452" size="1" face="Verdana">Start Date:
        <?= $rs->Fields['Data_01']->Value ?>
        </font></b></td>
    <td width="260"> 
      <p align="left"><b><font color="#525452" size="1" face="Verdana">Impact 
        Area: 
        <?= $rs->Fields['Data_02']->Value ?>
        </font></b></td>
    <td width="84"> 
      <p align="left"><b><font color="#525452" size="1" face="Verdana">Impact 
        %:
        <?= $rs->Fields['Data_03']->Value ?>
        </font></b></td>
    </tr>
  </table>


2
coopersita
Re: Quick Question

Try this:

Take away the <?PHP and the closing ?>, and echo or print the html you have.

3
Mestophales
Re: Quick Question

Thank You!

Login

Who's Online

257 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 257


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits