i need help to clean sytanx errors a little and to do a pagination for dinamic pages.i give a beer on paypall who helps me at the finish here is my code
<?php } while ($row_listaFilm = mysql_fetch_assoc($listaFilm)); ?>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_listaFilm == 0) { // Show if recordset empty ?>
Nessun film in questa categoria
<?php } // Show if recordset empty ?></td>
</tr>
<tr>
<td>Space for pagination</td>
</tr>
</table>
</div>
It does help a ton if you use the [ code ] or [ php ] BB tags when you post code. There's some handy icons above where you write your post that can help.
First a bit more information would be helpful to us, like what your code is or is not doing. Are you getting errors if so what are they. If it is not giving an error but is not working you could set "error_reporting(E_ALL)" and you might see the problem or at least it would give us here a clue to the problem.
I looks like "$_GET['pageNum_listaFilm']" is were you retrieving the page number from but I do not see "pageNum_listaFilm" set anywhere in your HTML. At minimum you need a link like so:
Or a form that has its "method" attribute set to "get" and a field in that form with a "name" of "pageNum_listaFilm".
Same goes for "$_GET['cat']" I do not see a link or a form field that sets the value of "cat".
Hope the helps. If not try to provide some more information.
Lastly a couple things you should do differently. Functions should never be defined inside an "if" statement. Your "GetSQLValueString" is in an "if" statement. Move the function outside of it and get rid of the "if". If you don't know that the "function_exists" you have made a mistake in your code. "function_exists" does have a use, but that is not how it was intended to be used.
Also your code is checking if the PHP version is less than 6, all PHP versions currently in use are less that version 6 so that is an unnecessary check. Version 6 is not even scheduled for release so it is likely a very long ways down the road before it is released, and even then your server may not update to it for quite some time after its release. And really when working with PHP you should know what version you have running on your server. I know some third party libraries may do a version check so their code works with old version but if your writing your own code you don't need it.
Bookmarks