Page 1 of 1

Needing to Submit a Form Using GET Information....

Posted: Mon Jun 20, 2016 8:12 am
by CodeNewbie
I am writing a support system for my website and I have a page to view the ticket which gets the ticket ID as a get request from the URL. The user and I need to be able to reply to the ticket and as part of the processing, I need the ticket ID to make sure the reply is linked to that ticket. I have tried to set the action to viewticket.php?view= and then making a get request for the ID but that doesn't work. I tried to add a hidden input to the form equal to the ticket ID and then using a POST request to get it for the next page but that doesn't work either.

I need a way to share the ticket ID between pages without messing around with sessions or anything like that.

Re: Needing to Submit a Form Using GET Information....

Posted: Mon Jun 20, 2016 8:37 am
by Celauran
Having the ticket ID in the URI should suffice. Can you post some code and outline where you're encountering difficulties?

Re: Needing to Submit a Form Using GET Information....

Posted: Mon Jun 20, 2016 10:27 am
by Christopher
CodeNewbie wrote:I am writing a support system for my website and I have a page to view the ticket which gets the ticket ID as a get request from the URL. The user and I need to be able to reply to the ticket and as part of the processing, I need the ticket ID to make sure the reply is linked to that ticket. I have tried to set the action to viewticket.php?view= and then making a get request for the ID but that doesn't work.
So you did viewticket.php?ticketid=12345 and then you checked $_GET['ticketid']?
CodeNewbie wrote:I tried to add a hidden input to the form equal to the ticket ID and then using a POST request to get it for the next page but that doesn't work either.
So you did <input type="hidden" name="ticketid" value="12345"> and then you checked $_POST['ticketid']?