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>
Member Avatar for diafol

You need ajax. Have a look at jquery.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.