URGENT!! PHP N HTML (someone pls save me frm this mess)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tiingshii
Forum Newbie
Posts: 6
Joined: Wed Aug 26, 2009 3:49 am

URGENT!! PHP N HTML (someone pls save me frm this mess)

Post by tiingshii »

OMG, the table that i was working on for these few days cannot be added to my html page!!!!!!

Image

can somebody save me? this is really important...
i did a few testing and found that its might be cause by the td in this code?

Code: Select all

td, th {
    background-color:#FFFFFF;
    text-align:center;
    border:1px solid #CCCCCC;
    padding:7px 20px 7px 20px;
}
 
whole script

Code: Select all

 
</style>
 
<span class="style2">
<style type="text/css">
<!--
body, th, td, p, small {
    font-family:'Times New Roman',Times,serif;
    font-size:100%;
    color:#757675;
}
small {font-size:90%;}
 
td, th {
    background-color:#FFFFFF;
    text-align:center;
    border:1px solid #CCCCCC;
    padding:7px 20px 7px 20px;
}
 
th {background-color:#a5a5a5; color:#FFFFFF;}
 
h1 {font-size:120%; color:#558;}
h1 .sortby {color:#855;}
-->
</style>
</span>
 
</head>
<center>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (SellingDates..psd) -->
<table id="Table_01" width="980" height="2001" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td rowspan="10">
            <img src="images/sellingdate_01.jpg" width="1" height="2000" alt=""></td>
        <td rowspan="2">
            <img src="images/sellingdate_02.gif" width="1" height="128" alt=""></td>
        <td colspan="16">
            <img src="images/sellingdate_03.jpg" width="975" height="92" alt=""></td>
        <td rowspan="8">
            <img src="images/sellingdate_04.gif" width="1" height="1930" alt=""></td>
        <td rowspan="10">
            <img src="images/sellingdate_05.jpg" width="2" height="2000" alt=""></td>
    </tr>
    <tr>
        <td colspan="2">
            <img src="images/sellingdate_06.jpg" width="53" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_07.gif" width="98" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_08.jpg" width="36" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_09.gif" width="168" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_10.jpg" width="31" height="36" alt=""></td>
        <td colspan="3">
            <img src="images/sellingdate_11.gif" width="122" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_12.jpg" width="34" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_13.gif" width="119" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_14.jpg" width="35" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_15.gif" width="75" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_16.jpg" width="35" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_17.gif" width="109" height="36" alt=""></td>
        <td>
            <img src="images/sellingdate_18.jpg" width="60" height="36" alt=""></td>
    </tr>
    <tr>
        <td colspan="17">
            <img src="images/sellingdate_19.jpg" width="976" height="60" alt=""></td>
    </tr>
    <tr>
        <td rowspan="5">
            <img src="images/sellingdate_20.gif" width="1" height="1742" alt=""></td>
        <td colspan="16">
            <img src="images/sellingdate_21.jpg" width="975" height="3" alt=""></td>
    </tr>
    <tr>
        <td colspan="8">
            <img src="images/sellingdate_22.jpg" width="486" height="859" alt=""></td>
        <td colspan="8">
            <img src="images/sellingdate_23.jpg" width="489" height="859" alt=""></td>
    </tr>
    <tr>
        <td colspan="16">
            <img src="images/sellingdate_24.jpg" width="975" height="3" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="images/sellingdate_25.jpg" width="3" height="869" alt=""></td>
        <td colspan="6">
            <img src="images/sellingdate_26.jpg" width="482" height="869" alt=""></td>
        <td colspan="9">
            <img src="images/sellingdate_27.jpg" width="490" height="869" alt=""></td>
    </tr>
    <tr>
        <td colspan="16">
            <img src="images/sellingdate_28.jpg" width="975" height="8" alt=""></td>
    </tr>
    <tr>
        <td colspan="18">
            <img src="images/sellingdate_29.png" width="977" height="68" alt=""></td>
    </tr>
    <tr>
        <td colspan="18">
            <img src="images/sellingdate_30.jpg" width="977" height="2" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        <td>
            <img src="images/spacer.gif" width="2" height="1" alt=""></td>
    </tr>
</table>
<div id="apDiv1">
  <div align="left">
    <?php
echo '<h1><span class="sortby">'.$header.'</span></h1>
<table width ="700" summary="List of demo fields">
<tr>
<th>Schools</th>
<th>Dates</th>
<th>Times</th>
</tr>';
 
$fp = fopen('sellingDate.txt','r');
if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>'; exit;}
 
while (!feof($fp)) {
    $line = fgets($fp,1024); //use 2048 if very long lines
    $row++;
    list ($schools, $dates, $times) = split ('\|', $line);
    if ($sortby == 'schools') $sortkey = strtolower($schools);
    if ($sortby == 'dates') $sortkey = strtolower($dates);
    if ($sortby == 'times') $sortkey = strtolower($times);
    $col[$row] = array($sortkey, $schools, $dates, $times);
}
 
fclose($fp);
 
$arrays = count($col) - 1;
 
$loop = 0;
while ($loop < $arrays) {
    $loop++;
    echo '
<tr>
<td>'.$col[$loop][1].'</td>
<td>'.$col[$loop][2].'</td>
<td>'.$col[$loop][3].'</td>
</tr>';
}
 
echo '</table>
 
'?>
  </div>
</div>
<!-- End ImageReady Slices -->
</body></center>
 
sousousou
Forum Commoner
Posts: 29
Joined: Fri Aug 28, 2009 1:10 pm

Re: URGENT!! PHP N HTML (someone pls save me frm this mess)

Post by sousousou »

Is it saved as .php or .html?
tiingshii
Forum Newbie
Posts: 6
Joined: Wed Aug 26, 2009 3:49 am

Re: URGENT!! PHP N HTML (someone pls save me frm this mess)

Post by tiingshii »

its save as html
sousousou
Forum Commoner
Posts: 29
Joined: Fri Aug 28, 2009 1:10 pm

Re: URGENT!! PHP N HTML (someone pls save me frm this mess)

Post by sousousou »

When you have php code in a file, you should save it as a .php file, otherwise the php code won't work.
tiingshii
Forum Newbie
Posts: 6
Joined: Wed Aug 26, 2009 3:49 am

Re: URGENT!! PHP N HTML (someone pls save me frm this mess)

Post by tiingshii »

i did research n php can b save as html. the php did work but it mess up my layout
Post Reply