Jump to content


Photo

Ad script


  • Please log in to reply
No replies to this topic

#1 Shadow Hatake

Shadow Hatake
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 22 March 2006 - 09:42 PM

I got bored and decided to code a random ad script. And this si what I've got...

<?php

include('dbconnect.php');

$query_link = 'SELECT link FROM ads';
$result_link = mysql_query( $query_link );
$row_link = @mysql_fetch_array( $result_link, MYSQL_ASSOC );

shuffle( $row_link );

echo '<a href="'.$row_link.'">';

$query_img = 'SELECT img FROM ads WHERE link = "'.$row_link.'"';
$result_img = mysql_query( $query_img );
$row_img = @mysql_fetch_array( $result_img, MYSQL_ASSOC );

echo'<img src="'.$row_img.'"></a>';

?>

Now when I go to test it it doesn't work. Help?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users