Re: Forcing a Post of data

From: Date: Tue, 05 May 2009 07:44:25 +0000
Subject: Re: Forcing a Post of data
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-292257@lists.php.net to get a copy of this message
Ashley Sheridan wrote:
On Tue, 2009-05-05 at 00:22 -0700, Richard Kurth wrote:
Ashley Sheridan wrote:
    
On Tue, 2009-05-05 at 00:09 -0700, Richard Kurth wrote:
How can I force this to be a POST and not a GET
<a href=customer.php?cid=1&location=customeradd.php> Add Customer </a> or is the only way you can pass data with a POST is from a Form submission.
            
The only way you can send post data is either through the form or using an AJAX call. In theory, you could have an onclick handler for this link which calls the AJAX, which then alters the page when it gets the return value. I wouldn't recommend it though, as the link would stop functioning as a link. Why do you want to send the data through POST anyway? Ash www.ashleysheridan.co.uk
      
Because some of the links get a lot of data in them and I would like to pass the info so it can't be seen. The example was small so no big deal. It was Just a thought.
    
If some of the links have a lot of data in, have you thought about trimming that down to what is necessary, and leaving the data that won't change in a session?
Yes I could just pass a session number and the gather all the data out of the session. I might just look at that


« previous php.general (#292257) next »