Forum Moderators: coopster
<?php
//con has been made already
$sql = "SELECT * FROM sidebar WHERE id = '1' ORDER BY id DESC limit 1";
$query = mysql_query($sql) or die("".mysql_error());
while( $show = mysql_fetch_object( $query ) ) {
eval("?>" . $show->content. "<?");
} ?>
<?php<--Will be better accepted when you tell the parser what it is!
$con = mysql_connect("localhost","username","password") or die('Could not connect: '.mysql_error());
<?php
//con has been made already
$sql = "SELECT * FROM sidebar WHERE id = '1' ORDER BY id DESC limit 1";
$query = mysql_query($sql) or die("".mysql_error());
while( $show = mysql_fetch_object( $query ) ) {
eval("?>" . $show->content. "<?php");
} ?>
<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database", $con);
$sql = "SELECT * FROM artikelen limit 5";
$query = mysql_query($sql) or die("".mysql_error());
while( $show = mysql_fetch_object( $query ) ) {
echo stripslashes($show->naam);
echo stripslashes($show->link);
}
echo "test";
?>