I want to display few rows per page (say 6), from a mysql table with php.
Now if there are more than 6 I have set up a form at the bottom where you click on a number eg 1 2 3.... page no. you can view at the bottom of this forum.
How can you display a number with an underscore using php?
Then in the target page, the value will be accessed from the $_GET array ($_GET['page'] in the above example).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Can you get this to work?
q) On 1 form I have this
echo "<form action=\"image_nextrow.html\" action=\"post\">";
echo "<input type=\"hidden\" name=\"data1\" value=\"ss\"> ";
echo "<input type=\"hidden\" name=\"data2\" value=\"ww\"> ";
echo "<input type=\"image\" value=\"submit\" src=\"2\" alt=\"2\" />";
echo "</form>";
On image_nextrow.html in the php section I have this and it fails to display anything, however in the url I notice the variables are being passes, so what is going on?
it because your script(image_nextrow.html) detected by server as html not as php script, so it doesn't execute your php code, so you need to change the page as image_nextrow.php.
alternativly, if you just want your page as .html but can run php code (assume u use apache server and do php as apache module), you should add this line
AddType application/x-httpd-php .html
on your(file) httpd.conf, on the part of
<IfModule mod_php5.c>
(if u use php5, otherwise just fine the line like AddType application/x-httpd-php, and below it add AddType application/x-httpd-php .html)
Bookmarks