Page 1 of 1

Anchors and php and CSS

Posted: Sun Aug 07, 2005 4:19 pm
by oldtimer
I am trying to make a page where you have anchors to go down to. It works but if i add something line a ?Cat1=1 any information on the page is reset. Any ideas?

My latest is mypage.php?Cat1=1#1 and so on.

I am working with a css tabed display. I am trying to have one form but only show portions of it depending on the anchor. But dont want to have to submit each portion before going to next.

It does work with just mypage.php#1 but I wanted to send some information to track which part of page is being looked at the most.

Posted: Sun Aug 07, 2005 4:43 pm
by Chris Corbyn
If you hyperlink to anything with a query string in it (?query=values) the page will reload because the query gets sent to the server in a GET request.

To avoid losing any info that has been entered until that point you will need to use something like sessions to keep track of anything submitted so far. If you need to store the data before you even send it to the server it can be done using javascript with a hidden IFRAME but that's not gonna work on all machines.