Page 1 of 1

Browsing database with form buttons

Posted: Sat Aug 21, 2004 1:10 pm
by punkee
I would like to make a page where users can browse info in database with buttons, but have no idea how. Searched all around but didnt find anithing similar. Onclick=next row or previous row and show data into iframe.
Any help apriciated!

Posted: Sat Aug 21, 2004 3:06 pm
by tim
search this form for 'pagination'

this topic has been covered numerous times.

:wink:

Posted: Sat Aug 21, 2004 4:05 pm
by punkee
Yes that was the only thing i found, but i want to make this with form buttons not with text links

Posted: Sat Aug 21, 2004 4:15 pm
by feyd
it's nearly the same thing between buttons and links...

Posted: Mon Aug 23, 2004 3:29 pm
by punkee
Yes but there is increment by ID by 1 and I have a base where are some records deleted and have ID's like 3,6, 7, 12,13 how to write to go tho the next row no mather the ID's???

Posted: Mon Aug 23, 2004 4:00 pm
by feyd
the exact same way you'd write a text link, have the id stored/sent to the receiving script through the link/location change through url parameters...

Posted: Tue Aug 24, 2004 3:01 pm
by punkee
Could you please explain more detailed, I'm a newbie

Posted: Tue Aug 24, 2004 3:11 pm
by feyd

Code: Select all

<input type="button" name="foo" value="next record" onclick="document.location = 'http://bar.com/your_script.php?foo=whatever+data+you+need+to+construct+the+query+again&start=3'" />
your processing script would take the data from the request string and recreate the query, adding $_GET['start'] to the limit restrictions..

that's doing it without posting.. with posting:

Code: Select all

<input type="submit" name="next" value="next record" />
to use this, your script would look for $_POST['next']



http://use.devnetwork.net/use.php?q=pagination for more details..

Posted: Wed Aug 25, 2004 2:46 pm
by punkee
OK... Ill try to work out litle, thanx for now :)