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?

le="color: #000000"><?php <?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

Donat-O-Meter

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

Latest GitHub Commits