I started using a company to host sample sites I have put together using php so I would have a portfolio. What I notice is how long it takes to run the php scripts I created. Even when it is simple such as the following.
Why?
link
<?php include "include/dbstore.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>
<table width="100%" border="1" cellspacing="0" bordercolor="#000000">
<thead><tr>
<th bgcolor="#000000"><span class="style1">Address</span></th>
<th bgcolor="#000000"><span class="style1">City</span></th>
<th bgcolor="#000000"><span class="style1">TG</span></th>
</tr>
<?php
$sql = "select type,color,price from products";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
/*echo '<tr><td><a href="location_geocode.php?address=' . $row['address'] . ',' . ucwords($row['city']) . ',CA">' . $row['address'] . '</td>';*/
echo '<tr><td>' . $row['type'] . '</td>';
echo ' <td>' . $row['color'] . '</td>';
echo ' <td>' . $row['price'] . '</td>';
}
?></table>
<!-- this is container end -->
</body>
</html>
dbstore.php
<?php
mysql_connect("host","userid","password") or die(mysql_error());
mysql_select_db("db") or die(mysql_error());
?>
howard
Why?
link
<?php include "include/dbstore.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
</head>
<body>
<table width="100%" border="1" cellspacing="0" bordercolor="#000000">
<thead><tr>
<th bgcolor="#000000"><span class="style1">Address</span></th>
<th bgcolor="#000000"><span class="style1">City</span></th>
<th bgcolor="#000000"><span class="style1">TG</span></th>
</tr>
<?php
$sql = "select type,color,price from products";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
/*echo '<tr><td><a href="location_geocode.php?address=' . $row['address'] . ',' . ucwords($row['city']) . ',CA">' . $row['address'] . '</td>';*/
echo '<tr><td>' . $row['type'] . '</td>';
echo ' <td>' . $row['color'] . '</td>';
echo ' <td>' . $row['price'] . '</td>';
}
?></table>
<!-- this is container end -->
</body>
</html>
dbstore.php
<?php
mysql_connect("host","userid","password") or die(mysql_error());
mysql_select_db("db") or die(mysql_error());
?>
howard