2014-09-27, 02:36 PM
Hi,
I recently started writing a PHP code of a SA-MP(game) user interface which is written in PHP and requires the servers(Separate from MyBB) database to connect. I have the script done t just needs a bit of style fixing but thats not my problem. I made a subpage called (panel.php) and tried including the PHP code there(I used PHP in templates plugin) but when i refresh the page I see a white background only. When i include any php code without a database it works but when i try incluging my config file which holds the mysql connection i get the white screen. Could someone please help?
Useful links:
http://bepowerserver.tk/forum/panel.php - Page where I want to include the panel
http://bepowerserver.tk/server/admins.php - The script i want to include
The code of admins.php:
Any help is appreciated, Thanks
I recently started writing a PHP code of a SA-MP(game) user interface which is written in PHP and requires the servers(Separate from MyBB) database to connect. I have the script done t just needs a bit of style fixing but thats not my problem. I made a subpage called (panel.php) and tried including the PHP code there(I used PHP in templates plugin) but when i refresh the page I see a white background only. When i include any php code without a database it works but when i try incluging my config file which holds the mysql connection i get the white screen. Could someone please help?
Useful links:
http://bepowerserver.tk/forum/panel.php - Page where I want to include the panel
http://bepowerserver.tk/server/admins.php - The script i want to include
The code of admins.php:
<?php
include('conf.php');
$query = "SELECT * FROM Admins";
$result = mysql_query($query);
echo "<table><tbody>
<tr style=
'border: 1px solid #151515;background: linear-gradient(to right, rgba(129, 129, 129, 0.24) 0%,rgba(129, 129, 129, 0.46) 50%,rgba(129, 129, 129, 0.24) 100%);font-weight: bold;text-align: center;color: rgb(223, 223, 223);'>
<td class='header'>
Nick
</td>
<td class='header'>
Ranga
</td>
</tr>";
while($row = mysql_fetch_array($result)){
echo " <tr style=
'border: 1px solid #151515;background: linear-gradient(to right, rgba(255, 215, 5, 0.24) 0%,rgba(255, 215, 5, 0.46) 50%,rgba(255, 215, 5, 0.24) 100%);font-weight: bold;text-align: center;color: rgb(223, 223, 223);'><td>" . $row['Nick'] . "</td><td>" . $row['Ranga'] . "</td></tr>"; //$row['index'] the index here is a field name
}
echo " </tbody></table>";
mysql_close();
?>
<table>
<tbody>
Any help is appreciated, Thanks