I need help with this, i've tried and tried but i just keep getting error upon error, can anybody help?
Code:
<?php
// Connects to your Database
mysql_connect("localhost", "", "") or die(mysql_error());
mysql_select_db("") or die(mysql_error());
$data = mysql_query("SELECT * FROM ads WHERE Paid = 'Yes'")
or die(mysql_error());
if ($data[Paid]) == "Yes" {
echo " ?>
<a href=\"<?php $result=mysql_query('select * from ads');while($row=mysql_fetch_array($result)){echo $row[Site]. \"\";} ?>\">
<img src=\"<?php $result=mysql_query('select * from ads');while($row=mysql_fetch_array($result)){echo $row[bannerurl]. \"\";} ?>\" border=\"0\"><?php "; } else { echo ""; }?>
Its probobly all messed up but thats why i posted here, can anybody help