Jump to content

php engine not picking up mysql while script


SmileyWar

Recommended Posts

Hiya guys,

 

I'm having problems with a code i have written, it seems that nor google or my own search engine is picking up the links?

And i don't understand why. I know the following code has a div on click rule, but i have also added an a href.

 

I tried the basic link which is also not picking up.

 

<?php

$old_pattern = array("/[^a-zA-Z0-9]/", "/_+/", "/_$/");
$new_pattern = array("_", "_", "");
$i = '1';


	while($row = mysql_fetch_array($result))
	{

	${videoData_.$i} = mysql_query("SELECT * FROM videoData WHERE qid=".$row['id']."") or die(mysql_error());
	${row_.$i} = mysql_fetch_array(${videoData_.$i});

	${vote_.$i} = mysql_query("SELECT SUM(votes) FROM answers WHERE qid=".$row['id']."")or die(mysql_error());
	${votes_.$i} = mysql_fetch_array(${vote_.$i});	


	$pagelink = strtolower(preg_replace($old_pattern, $new_pattern , $row['question']));


	echo '<div class="NVP-div" ';
	echo 'onclick="location.href=\'http://www.thevideopoll.com/polls/';
	echo $link = "".$row['id']."".$pagelink.".php";
	echo '\';" style="cursor: pointer;"';
	echo '>';

	echo '<img style="float:left; margin-left:25px;" src="http://img.youtube.com/vi/'.${row_.$i}['videoID'].'/default.jpg">';
	echo '<p class="NVP-vote">';
	echo ${votes_.$i}['SUM(votes)'];
	echo ' Votes';
	echo '</p>';
	echo '<br>';
	echo '<a class="new-video-links" href="http://www.thevideopoll.com/polls/';
	echo $link = "".$row['id']."".$pagelink.".php";
	echo '" title="'.$row['question'].'">';


	echo "".$row['question']."";
	echo "</a>";

	echo '</div>';

	$i++;

	}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.