am developing a application that fetches data from mysql database.
i am using php, javascript for developing and html, css to design.
i have attached a screenshot which describe my page..
The problem am getting is when i click next 10 record the page is initalized to zero though there are records..
can any one suggest me where the problem might be?
here is the code where i fetch records and do paging.
Ever hear of SQL injection attacks? You'll *really* want to look in to that.
By "there are records" what do you mean? That they're in the database, or that they're successfully retrieved from the DB and your loop is wrong? If you run the "next page" query manually, does it work?
How do you go *back* through the records?
Ugh, every time I see PHP I am reminded why I really dislike it as a language.
ya the records are fetched from database.
but the problem is it does not work inside tabs.
i need suggestion from you all, how to display it inside the tab as in the screenshot
Tabs? I don't even recall seeing anything about tabs in the original post.
That would depend on how you're implementing your tabs--I don't see anything in the code you posted about that, so I don't really know how to help other than to point you at the web: there are thousands of pages detailing any of the hundreds of ways there are to implement tabs.
I was serious about the SQL injection--anybody using your page could delete all the records in your database, unless PHP does more under-the-covers now than I remember it doing.
When you use innerHTML to add content and it contains script tags, they do not get evaluated. Plus it is also bad to return a full html doc and stick it into the middle of the page. Think what the browser deals with with multiple head, body, and html tags.