Azraeliitti Posted May 9, 2006 Share Posted May 9, 2006 I am working to enhance this commercial website link removed (it's in finnish). There are lots of categories on the website that can take over 2 pages to scroll after they've been opened and I've noticed it being really annoying when every time you open a category, it refreshes the page and throws you back into the top of the page. I don't have much experience with PHP, so does anyone know how to fix this issue? Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 9, 2006 Share Posted May 9, 2006 (edited) Any variable can be passed over to the next page, in various ways.You van change the links to page.php?variable=value, to have the variable directly passed over and available in the $_GET['variable'] global var.Also, via the post method. Make a form, in which each variable has an input element, when submitted, the vars will be posted on the next page. Same use of as with the GET, but when using such form, use $_POST['variable'] instead. There are more ways, but these are the easiest. When you need something else, think about storing in a database, or using cookies <a href="nextpage.php?screenwidth=1024">Next</a>(available: $_GET['screenwidth'] = "1024", tutorial: php_get)<form action="nextpage.php" method="post"><input type="hidden" name="screenwidth" value="1024" /><button type="submit">Next</button></form>(available: $_POST['screenwidth'] = "1024", tutorial: php_post) Edited May 9, 2006 by Dan The Prof Link to comment Share on other sites More sharing options...
Azraeliitti Posted May 10, 2006 Author Share Posted May 10, 2006 Thanks for your reply, I'll get to it. Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 10, 2006 Share Posted May 10, 2006 Call us again if you still need help, when the tutorials can't help you :)Oh and by the way, welcome to the forums Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now