0

Hello,

I have page with several sections, in each section form with submit button which will load table and execute mysql queries. I need help to make long tables in more pages, or at least make scroll so user don't have to take long time to go from part to part of page.

I was able to make both options, but not on my main page, problem is that I am having tables load only after button is pressed, not on page load. So when I load table, and I press next 10 rows, it loads page but without table, because button to load it is not pressed. Here is example of my code.

<form id="form6" name="form6" method="post" action="user.php">


<p class='p1'>DISPLAY OF ALL DATA
</p>



<div class='div1'>
<input type="submit" name="display_all_data" id="display_all_data" value="DISPLAY ALL DATA" />
</div>


<?php

  if (isset($_POST['display_all_data']))
{


//PHP AND SQL QUERIES, AND CODE FOR COUNTING ROWS, AND DEFINING NUMBER OF PAGES FOR TABLE, AND AFTER BUTTON FOR NEXT PAGE OR ANY NUMBER OF PAGE IS PRESSED PAGE LOADS WITHOUT TABLE, BECAUSE BUTTON display_all_data IS NOT PRESSED AGAIN, AND ISSET IS NOT ACTIVATED.

I hope you understand where I need my help, thanks in advance.

2
Contributors
2
Replies
22
Views
2 Years
Discussion Span
Last Post by filipgothic
0

I tried, it works with clasic table which load on page load, but I have table which loads only on button pressed. So when I load page I get page numbers for example 1,2,3,4 and when I click on some number, page refreshes with url?$page but without table, because main button is not pressed in first place

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.