|
Been using this script for a couple of years now, and it works just fine. But when I copied it over to a new website and changed the variables to fit the new database, it won't work. The script author no longer offers support, instead suggesting users come here for help.
The old script is on a website using the following doctype:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"<U><FONT color=#0000f0 size=1>
The new page uses:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" >
The major difference in the two pages (other than the doctype) is, the first was written using the old table formatting style, while the new page uses CSS.
Here is the code:
<div class="colmask fullpage">
<div class="col1">
<!-- Start Content -->
<table>
<tr>
<th>Host Name</th>
<th>Established</th>
<th>Price</th>
<th>Disk Space</th>
<th>Bandwidth</th>
<th>Economy Plan Available</th>
<th>Allows Mailing Lists</th>
<th>Server Platform</th>
<th>SSL Included</th>
<th>eCommerce Ready</th>
<th>Affiliate Program</th>
</tr>
<?php
include("dbinfo.inc.php");
$query="SELECT * FROM webhosts ORDER BY progname ASC";
$result=mysql_query($query)or die(mysql_error());
$num=mysql_numrows($result);
mysql_close();
$i=0;while($i< $num){
$hostname=mysql_result($result,$i,"hostname");
$url=mysql_result($result,$i,"url");
$established=mysql_result($result,$i,"established");
$price=mysql_result($result,$i,"price");
$diskspace=mysql_result($result,$i,"diskspace");
$bandwidth=mysql_result($result,$i,"bandwidth");
$econplan=mysql_result($result,$i,"econplan");
$maillists=mysql_result($result,$i,"maillists");
$platform=mysql_result($result,$i,"platform");
$ssl=mysql_result($result,$i,"ssl");
$ecommerce=mysql_result($result,$i,"ecommerce");
$affiliate=mysql_result($result,$i,"affiliate");?>
<tr>
<td><a href="<?phpecho $url;?>"><?phpecho $hostname;?></a></td>
<td><?phpecho $established;?></td>
<td><?phpecho $diskspace;?></td>
<td><?phpecho $bandwidth;?></td>
<td><?phpecho $econplan;?></td>
<td><?phpecho $maillists;?></td>
<td><?phpecho $platform;?></td>
<td><?phpecho $ssl;?></td>
<td><?phpecho $ecommerce;?></td>
<td><?phpecho $affiliate;?></td>
</tr>
<?php
$i++;}?>
</table>
<!-- End Content -->
</div>
</div>
|