PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
punkee
Forum Newbie
Posts: 5 Joined: Sat Aug 21, 2004 1:10 pm
Post
by punkee » Sat Aug 21, 2004 1:10 pm
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!
tim
DevNet Resident
Posts: 1165 Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio
Post
by tim » Sat Aug 21, 2004 3:06 pm
search this form for 'pagination'
this topic has been covered numerous times.
punkee
Forum Newbie
Posts: 5 Joined: Sat Aug 21, 2004 1:10 pm
Post
by punkee » Sat Aug 21, 2004 4:05 pm
Yes that was the only thing i found, but i want to make this with form buttons not with text links
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Aug 21, 2004 4:15 pm
it's nearly the same thing between buttons and links...
punkee
Forum Newbie
Posts: 5 Joined: Sat Aug 21, 2004 1:10 pm
Post
by punkee » Mon Aug 23, 2004 3:29 pm
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???
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Aug 23, 2004 4:00 pm
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...
punkee
Forum Newbie
Posts: 5 Joined: Sat Aug 21, 2004 1:10 pm
Post
by punkee » Tue Aug 24, 2004 3:01 pm
Could you please explain more detailed, I'm a newbie
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Aug 24, 2004 3:11 pm
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..
punkee
Forum Newbie
Posts: 5 Joined: Sat Aug 21, 2004 1:10 pm
Post
by punkee » Wed Aug 25, 2004 2:46 pm
OK... Ill try to work out litle, thanx for now