So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to do everything I want except for this. I want the script to only show 5 at a time (which i have accomplished no problem), but I'm also trying to make it so that when the user clicks a button it will show the next 5 records in the database so they can view all records, but only 5 at a time. (I hope this makes sense). So I need the button to add 5 to my $start variable, and then re-run my for loop.
$start = 0;
echo $start . "<br /><br />";
$result2 = mysql_query("SELECT * FROM testtable LIMIT $start,5") or die(mysql_error());
$row2 = mysql_fetch_array($result2);
for($counter = 1; $counter <= 5; $counter += 1)
{
echo $row2['ID'] . "<br />";
echo " Subject:<b><font color='red'> " . $row2['Subject'] . "</font></b>";
echo "<br />Message: <b>" . $row2['Message'] . "</b><br /><br />";
$row2 = mysql_fetch_array($result2);
}
mysql_close($con)
?>
<br />
<form>
<input type="button" value="submit" onclick="<?php $start += 5; ?>" />
</form>
<?php echo $start; ?>
Any help would be greatly appreciated!
Trigger tag in aspx is not coming
hi all ,iam new to ajax, iam using file upload inside the update pannel but right now i want to use trigger tag but it is not coming, for that whether i want to install anything like toolkit ,please
RadioButtonList data selection
view plaincopy to clipboardprint?<asp:RadioButtonList ID="type" runat="server" TextAlign="left" CssClass="contactTypeRadio"> <asp:ListItem Value="Inquiry" Selected="True" />
question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.I have roughly 30 files. I want to be able to edit every $_POST and $_GETCode:
Delete all files in folder except with certain name
I have a script that I want to delete all files in a folder (taken from a database) except for one named thumb1.jpgI have this, but this deletes all the files and a subfolder if there is one. How can
Need Help with a query
Hello, For some reason I am just not getting the right answer when I do this query and not quite sure why? $runinposition = mysql_query("SELECT * FROM bb_off WHERE user='$user' AND test1='test1'
Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down menu in the php file that is executed afterwards. when I echo frmcounty in the php file it returns
What are the two different files you download to update kernel?
What are the two different files you download to update kernel?
if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough to do, but I'm flailing here...I need to have a blurb that checks to see if a cookie of a specific
ScriptManager History and Opera Issue
I am having an issue in opera with the ScriptManager. I have a ScriptManager on a page with history enabled. On the same page i have 5 LinkButtons which update Panel content. On the OnClick event of
Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make your files, mysql stuff, and all that set for the best character type..... got a check list i can