michaelll Posted May 4, 2011 Share Posted May 4, 2011 Ok, so I currently have this http://pastebin.com/cCgyavs0 snippet that generates links to the previous, next and last page based on the current page (GET variable) or the total item count in the MySQL DB to then use forms as links by inserting the URLs into the action attribute. I did this cause I don't wanna use images as links, btw It kinda works - I get links like: shop.php?page=1 shop.php?page=12 shop.php?page=14 shop.php?page=225 When I'm on page 13 of 225 for example. Though when I click one of the buttons, I always get redirected to "shop.php?". :/ Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/ Share on other sites More sharing options...
efficacious Posted May 4, 2011 Share Posted May 4, 2011 could you post the html source of one of the links in question. (the generated links) Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/#findComment-1210533 Share on other sites More sharing options...
michaelll Posted May 4, 2011 Author Share Posted May 4, 2011 <div id="pagenav"> <div class="pagenavwrapper"> <form action="shop.php?page=1"> <input type="submit" value="" id="first"> </form> <form action="shop.php?page=11"> <input type="submit" value="" id="prev"> </form> <span class="textInPageNav"> Seite 12/225 </span> <form action="shop.php?page=13"> <input type="submit" value="" id="next"> </form> <form action="shop.php?page=225"> <input type="submit" value="" id="last"> </form> </div> </div> that's the code being put out screenshot of the website, btw: http://dl.dropbox.com/u/2499075/Screenshots/webshop.png EDIT: dont ask me btw, why I can do that webshop but am not able to generate simple links Cause I dont get it either. Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/#findComment-1210534 Share on other sites More sharing options...
fugix Posted May 4, 2011 Share Posted May 4, 2011 you need to specify unique names for each submit button.. Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/#findComment-1210541 Share on other sites More sharing options...
michaelll Posted May 4, 2011 Author Share Posted May 4, 2011 Thanks, that solved it for me. Dunno why I didnt assign names in the first place... Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/#findComment-1210547 Share on other sites More sharing options...
fugix Posted May 4, 2011 Share Posted May 4, 2011 Glad I could help Quote Link to comment https://forums.phpfreaks.com/topic/235539-need-help-with-some-php-generated-form-actions/#findComment-1210571 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.