Mobile app version of vmapp.org
Login or Join
RJPawlick198

: Ways for client to include page ID in query? I'm no expert on web development, and need to find a way to let the browser call a PHP routine on the server with the current document ID as

@RJPawlick198

Posted in: #Html #Http

I'm no expert on web development, and need to find a way to let the browser call a PHP routine on the server with the current document ID as parameter, eg.
www.acme.com/index.php?id=1
I then need to call eg. /change.php with id=1 to do something about that document.

Unless I'm mistaken, there are three ways for the client to return this information:


if passed as argument in the URL (as above), it will be available as HTTP referrer
by including it as hidden field in
by sending it as cookie


I suppose using a hidden field is the most obvious choice. Are there other ways? Which solution would you recommend? Any security issues to be aware?

Thank you.



Edit: I needed a way for the client to learn some of the information returned by the server, such as the document ID. Apparently, the right way to solve my problem is by changing the server-side code so that this information is included in hyperlinks/forms included in the HTML page.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @RJPawlick198

1 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale272

Seems to me the deportment of the modern web is now in full motion to url-as-arguments.
www.acme.com/page1, www.acme.com/page2 www.acme.com/page/1, www.acme.com/page/2
Mod-rewrite can get you there. (Eventually)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme