Re: Problem of pagination
Well firstly, in your condition, you:
PHP Code:
is_int ($_GET ['page'])
Even if $_GET ['page'] is a number it is not considered as integer by PHP so this test will fail whatever happens. So always be worth $Page 0.
But anyway: Most of your code is useless. In fact, you can directly use WHERE to get your page without using COUNT, LIMIT and ORDER BY ... :
PHP Code:
SELECT * FROM news WHERE id = $Page
Finally, you does not escape your data to HTML output. If this is not done on purpose, there is a security hole if not done on purpose, I think it's a bad idea to use htmlspecialchariser data recording.
Re: Problem of pagination
Thank you for the info
In fact, most of my script was made from a tutorial on the site. I don't have much control over php. It was already a good start, knowing that I learned HTML and CSS from another site.
I will try to find other examples of news and re tweak my code.
Re: Problem of pagination
yes HTML and CSS is good because it does not much rigor in contrast to programming languages ...
Re: Problem of pagination
php generates html (even css). So I see no where is the problem. Simply that your class is defined in the css related to your html page