954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Refresh only a certain part of a page

I want to refresh only a certain part of a php code. i have http://www.daparadise.com/profile.php?id=11 that page as my users profile. And only want to show 5 videos at a time. But if they have more then 5 videos i want it to ONLY refresh that part to the next 5 videos. I know how to do pagination but how would i get it to only re fresh that section of the profile??

<td width='25%'>Videos</td>
<td><?php $sql = mysql_query("SELECT * FROM videos WHERE UID='$userid'");
while($row = mysql_fetch_assoc($sql)){
$vid = $row['ID'];
$title = $row['Title'];
$thumbnail = $row['Thumbnail'];
echo "<a href='/watchvideo.php?ID=$vid'><img src='$thumbnail' width='85' height='75' title='$title'></a> ";
}
?></td>
zacharysr
Newbie Poster
23 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

You need ajax. Have a look at jquery.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: