Passing vars in a link ?

From: Pjotr Wedersteers (x33159_at_westerterp.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 18:22:53 +0200

Hello again,

I have now several consecutive forms in my site which nicely pass variables
in POST, so they won't show up in the header.
Now I have a page people reach after submitting all kinds of information,
from where I offer a link users can click on.
Let's say I have collected several strings and I have put these in an array
and serialized that.

$var[0]='John Doe';
$var[1]='2345 Livnigston Ave';
$var[2]='Boston';
$var[3]='Plumber';
$data = serialize ($var);

When the user clicks the (only) link on this page, all this serialized data
needs to be passed along to the new page.
I did this:

(...)
// $data contains the serialized array
echo "<a href='action.php?data=$data'>go here</a>";

First question: using this method the $data is passed via GET. I would
prefer to keep using POST, and not have ugly tell-tale headers. Is that
possible using PHP? How? [I'd rather not use sessions here which would avoid
the entire datapassing issue.]

Second question: when I echo back $data in the action.php script, it seems a
chunk of the string is missing. Is that due to a limit in length ? How long
a string can be passed as a single var ? Different for GET vs POST ? Like it
is unserialize returns FALSE, which makes sense, as the data is incomplete.

Help appreciated. If you need more specifics, I'm happy to elaborate.
Pjotr



Relevant Pages

  • Re: AxShDocVw.AxWebBrowser.Navigate and object headers
    ... Http headers are just string name/value pairs. ... If you can serialize ... header from the Request, or the body, etc. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is it possible for me to have an alert pop-up when I open a do
    ... them and clean up the whole header. ... Dim TheWeekOfStr As String ... After I enabled macros and changed the security level, as per Dave Peterson, ... I got almost what I wanted, except that the pop-up box contains the font ...
    (microsoft.public.excel.misc)
  • Re: web service not serializing all object properties
    ... Web services will only serialize public properties. ... private string strUnParsed_m; ... public string UnParsed ... public ValuePart Add ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Zero terminated strings
    ... For doing major string handling you want a language where strings are a ... Check the header bytes as they are coming in and assume that you have dropped at least one byte if any of them are wrong. ... When you have a complete valid message (at the final destination, however many hops down the line it is) the final destination acknowledges it, and keeps sending ACKs for it until it receives the next message. ... The sender keeps trying to send it until it gets the acknowledgment. ...
    (comp.lang.c)
  • Re: Compile Error (ADO) Ron De Bruin
    ... Public Sub GetData(SourceFile As Variant, SourceSheet As String, _ ... Dim rsData As ADODB.Recordset 'THE ERROR IS ALWAYS HERE ... If Header = False Then ...
    (microsoft.public.excel.programming)