Hello, i cant understand what the problem is .... when i add the css file you cant see what i echo out but only the tables and when i delete the css file everithing work fine... Here is the php file. maybe something is wrong here.. $sql = "SELECT * FROM producten"; $myData = mysql_query($sql,$con); echo '<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table"> <tr> <th class="table-header-check"><a id="toggle-all" ></a> </th> <th class="table-header-repeat line-left minwidth-1"><a href="">Product</a> </th> <th class="table-header-repeat line-left minwidth-1"><a href="">Categorie</a></th> <th class="table-header-repeat line-left"><a href="">Beschrijving</a></th> <th class="table-header-repeat line-left"><a href="">Nr</a></th> <th class="table-header-repeat line-left"><a href="">Prijs</a></th> <th class="table-header-options line-left"><a href="">Options</a></th> </tr>'; while($record = mysql_fetch_array($myData)){ echo "<tr>"; echo '<td><input type="checkbox"/></td>'; echo "<td>" . " " . $record['Product'] ." </td>"; echo "<td>" . " " . $record['Item'] . " </td>"; echo "<td>" . " " . $record['Description'] . " </td>"; echo "<td>" . " " . $record['Extra'] . " </td>"; echo "<td>" . " " . $record['Valuta'] . " </td>"; echo "<td>" . " " . $record['Price'] . " </td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> PHP: Thanks for any help.
This. Also, if adding a CSS file makes things disappear, it's probably a good idea to look at the CSS code first.
Unless of course how you include the CSS echo'ing out link is broken... but really as others have said we need to see more... Though what you have is a needlessly pointlessly convoluted mess of garbage... using multiple echo for nothing, multiple string additions for nothing, endless pointless classes for nothing, attributes like BORDER that have no business in any HTML written after 1997, etc, etc... Big tip, if the majority of your items inside a single parent are all getting the same class, none of them should have that class -- only apply classes when things are DIFFERENT. (A lesson the nitwits over at turdpress seem to refuse to learn) Much less the use of the mysql_ functions which we've been told for EIGHT YEARS to stop using, and that they FINALLY added giant red warning boxes to the manual further emphasizing the point. (that everyone seems to still be ignoring) /* assuming $db is a connected PDO object */ $statement = $db->query(' SELECT * FROM production '); echo ' <table id="productTable"> <thead> <tr> <th scope="col" class="toggle"><a id="toggle-all" href="#"></a></th> <th scope="col" class="minimum1"><a href="#">Product</a></th> <th scope="col" class="minimum1"><a href="#">Categorie</a></th> <th scope="col"><a href="#">Beschrijving</a></th> <th scope="col"><a href="#">Nr</a></th> <th scope="col"><a href="#">Prijs</a></th> <th scope="col" class="options"><a href="#">Options</a></th> </tr> </thead><tbody>'; while ($row = $statement->fetch()) { echo ' <tr> <td><input type="checkbox"/></td> <td>',$row['Product'],'</td> <td>',$row['Item'],'</td> <td>',$row['Description'],'</td> <td>',$row['Extra'],'</td> <td>',$row['Valuta'],'</td> <td>',$row['Price'],'</td> </tr>'; } echo ' </tbody> </table>'; ?> Code (markup): At least cleans up what you have shown us so far.
tasos55 When you are writing html code inside PHP remember that wherever "=" comes you need to be careful woth the syntax. For Example: if your code is <th class="table-header-check"><a id="toggle-all" ></a> </th> Code (markup): Your code when writing inside the PHP should be like this: <th class=\"table-header-check\"><a id=\"toggle-all\" ></a> </th> Code (markup): Your Code after Modification is as follows: $sql = "SELECT * FROM producten"; $myData = mysql_query($sql,$con); echo '<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" id=\"product-table\"> <tr> <th class=\"table-header-check\"><a id=\"toggle-all\" ></a> </th> <th class=\"table-header-repeat line-left minwidth-1\"><a href=\"\">Product</a> </th> <th class=\"table-header-repeat line-left minwidth-1\"><a href=\"\">Categorie</a></th> <th class=\"table-header-repeat line-left\"><a href=\"\">Beschrijving</a></th> <th class=\"table-header-repeat line-left\"><a href=\"\">Nr</a></th> <th class=\"table-header-repeat line-left\"><a href=\"\">Prijs</a></th> <th class=\"table-header-options line-left\"><a href=\"\">Options</a></th> </tr>'; while($record = mysql_fetch_array($myData)){ echo "<tr>"; echo '<td><input type=\"checkbox\"/></td>'; echo "<td>" . " " . $record['Product'] ." </td>"; echo "<td>" . " " . $record['Item'] . " </td>"; echo "<td>" . " " . $record['Description'] . " </td>"; echo "<td>" . " " . $record['Extra'] . " </td>"; echo "<td>" . " " . $record['Valuta'] . " </td>"; echo "<td>" . " " . $record['Price'] . " </td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Code (markup):
Please, PLEASE tell me you don't actually write code that way!!! That is the UGLIEST, DUMBEST way to build an echo; Take a look at what I did -- if you use single quotes to open and close the echo, you don't need ANY backslash escaping of doubles -- that train wreck of slashes you put in is a painful disaster of code... and for nothing since apparently you are USING single quotes, so there is NO legitimate reason to be escaping the doubles!!!