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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CodeNewbie
Forum Newbie
Posts: 1
Joined: Mon Jun 20, 2016 7:59 am

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

Post 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.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

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

Post by Celauran »

Having the ticket ID in the URI should suffice. Can you post some code and outline where you're encountering difficulties?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

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

Post 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']?
(#10850)
Post Reply