TheSupportForum |
05-07-2013 09:29 AM |
Converting Standard PHP to vBulletin
hi all i am in need of some help
i have a php file that needs to work with vbulletin 4.2.1
here is my php file content
PHP Code:
$con=mysqli_connect("localhost","citizens","password","citizens"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$color ="#ffffff"; $color3 ="#6CC"; $fontsize ="2"; $color3 ="#69C";
echo "<center><table> <tr> <td colspan='3' align='center' bgcolor='" . $color3 . "'><strong><a name='Albania' id='Albania'>Albania</a></strong></td> </tr> <tr> <th >CitizenID</th> <th>Citizen Name</th> </tr>";
$albania = mysqli_query($con,"SELECT * FROM `data` WHERE citizenship='Albania' ORDER BY citid ASC"); while($row = mysqli_fetch_array($albania)) {
echo "<tr>"; echo "<td align='center' valign='middle' width='75px' bgcolor='" . $color3 . "'><font size='" . $fontsize . "'><a href='http://www.erepublik.com/en/citizen/profile/" . $row['citid'] . "' target='_blank'>".$row['citid']."</a></td>"; echo "<td align='left' valign='middle' bgcolor='" . $color . "'><font size='" . $fontsize . "'>" . $row['citname'] . "</td>"; echo "</tr>"; } echo "</table>"; echo "<br>";
mysqli_close($con);
what i want to do is load all this into a template, would need alot of advice and help on this
|