Jump to content

Ad script


Shadow Hatake

Recommended Posts

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

[code]<?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>';

?>[/code]

Now when I go to test it it doesn't work. Help?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.