Hi hopefully someone can help me with my script. I have a mysql database query in php script that outputs a html table. I want to use a style sheet that works on the same page below. The bottom part of the sript is HTML with php variables inside, and this works very well. But the top example is the other way around....Php script with html inside... I have tried putting the link to the stylesheet with <link rel="stylesheet" type="text/css" href="http://localhost/stylesheet.css" /> the same as the example at the bottom but get the following error "syntax error, unexpected T_STRING "
does anyone know how to link to the style sheet so that it works like the bottom example but in the top (PHP) example?
PHP EXAMPLE NOT WORKING (works but not with CSS link)
for($i=0;$i<count($_SESSION['somevar']);$i++)
{
if($_SESSION['somevar'][$i]!=NULL)
echo("<table>
<tr>
<td>Train № ".$_SESSION['somevar'][$i]." "."</td>
<td>on ".$_SESSION['somevar'][$i]." "."</td>
<td>from ".$_SESSION['somevar'][$i]." "."</td>
<td>to ".$_SESSION['somevar'][$i]." "."</td>
<td>to ".$_SESSION['somevar'][$i]." "."</td>
<td>№ of ".$_SESSION['somevar'][$i]." "." tickets ".$_SESSION['somevar'][$i]." "."</td>
<td>at ".$_SESSION['somevar'][$i]." each"."</td>
</tr>
</table>");
}
?>
HTML EXAMPLE WORKING
<link rel="stylesheet" type="text/css" href="http://localhost/stylesheet.css" />
<form id="bookform<?php echo($i) ?>" method="post" action="">
<input type="hidden" name="somevar" value="<?php echo($row['somevar'])?>" />
</form>
<table class="special-tablestyle-b">
<td>
<th>some text <?php echo($row['somevar'])?></th>
<th>some text <?php echo($row['somevar'])?></th>
<th>some text </th>
<th>some text <?php echo($row['somevar'])?></th>
<th>some text <?php echo ($_REQUEST['somevar'])?></th>
<th>(Duration)</th>
</td>
</table>