Does anyone know if it's possible to post to a page without using a
form? For example, if I want to pass a variable to another page
without using a cookie, is there a way to pass it using post?
>
Hi,
>
Does anyone know if it's possible to post to a page without using a
form? For example, if I want to pass a variable to another page
without using a cookie, is there a way to pass it using post?
>
Thank you,
Phil
The short answer is no.
However, it might be possible to create some hack using AJAX to
send data specific to the user's system (I don't know what might
be unique) and then dynamically generate the rest of the page
based on that.
This fails spectacularly when JS is disabled, though.
Why not just use cookies?
--
Andrew Poelstra apoelstra@wpsof tware.com
To email me, use the above email addresss with .com set to .net
>Hi,
>>
>Does anyone know if it's possible to post to a page without using a
>form? For example, if I want to pass a variable to another page
>without using a cookie, is there a way to pass it using post?
>>
>Thank you,
>Phil
>
The short answer is no.
>
However, it might be possible to create some hack using AJAX to
send data specific to the user's system (I don't know what might
be unique) and then dynamically generate the rest of the page
based on that.
>
This fails spectacularly when JS is disabled, though.
>
Why not just use cookies?
>
Why nor just simply enclose it in a form? BTW, what happens with
writing to cookies to pass information if the user has cookies disabled?
Hi,
>
Does anyone know if it's possible to post to a page without using a
form? For example, if I want to pass a variable to another page
without using a cookie, is there a way to pass it using post?
>
Thank you,
Phil
>
You can't post to a page. But why not put the variable in the $_SESSION
array? That's what it's there for.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
>>Hi,
>>>
>>Does anyone know if it's possible to post to a page without using a
>>form? For example, if I want to pass a variable to another page
>>without using a cookie, is there a way to pass it using post?
>>>
>>Thank you,
>>Phil
>>
>The short answer is no.
>>
>However, it might be possible to create some hack using AJAX to
>send data specific to the user's system (I don't know what might
>be unique) and then dynamically generate the rest of the page
>based on that.
>>
>This fails spectacularly when JS is disabled, though.
>>
>Why not just use cookies?
>>
>
Why nor just simply enclose it in a form?
Because that would require a form-submission to reach every page.
BTW, what happens with writing to cookies to pass information
if the user has cookies disabled?
I've tried browsing without cookies. Oftentimes it is much faster and
sites are easier to use - and consistent, since they are stateless -
but I can log into very few sites. I don't consider this a fault of
any given site, nor do most users who have the presence-of-mind to
disable cookies.
The only two technically-feasable ways to maintain session data is
through cookies or URL rewriting. The former will not, as you say,
work without cookies, but the latter is fraught with peril.
--
Andrew Poelstra apoelstra@wpsof tware.com
To email me, use the above email addresss with .com set to .net
>Hi,
>>
>Does anyone know if it's possible to post to a page without using a
>form? For example, if I want to pass a variable to another page
>without using a cookie, is there a way to pass it using post?
>>
>Thank you,
>Phil
>>
>
You can't post to a page. But why not put the variable in the $_SESSION
array? That's what it's there for.
>
$_SESSION still depends on cookies or URL rewriting behind the scenes to
keep its session data associated with the appropriate user.
--
Andrew Poelstra apoelstra@wpsof tware.com
To email me, use the above email addresss with .com set to .net
Hi,
>
Does anyone know if it's possible to post to a page without using a
form? For example, if I want to pass a variable to another page
without using a cookie, is there a way to pass it using post?
>
Thank you,
Phil
On 2008-08-16, raashid bhatt <raashid_hbk@ya hoo.comwrote:
On Aug 15, 9:53 pm, cplxp...@gmail. com wrote:
>Hi,
>>
>Does anyone know if it's possible to post to a page without using a
>form? For example, if I want to pass a variable to another page
>without using a cookie, is there a way to pass it using post?
>>
>Thank you,
>Phil
>
Yes why not it can be done with AJAX
Because AJAX requires javascript, which should never be used for
site-critical functionality.
--
Andrew Poelstra apoelstra@wpsof tware.com
To email me, use the above email addresss with .com set to .net
>Hi,
>>
>Does anyone know if it's possible to post to a page without using a
>form? For example, if I want to pass a variable to another page
>without using a cookie, is there a way to pass it using post?
>>
>Thank you,
>Phil
>
>Yes why not it can be done with AJAX
AJAX will cause usability and accessibility problems if not done
properly. And in this case it's definitely the wrong tool.
Thank you everyone for the replies. I suppose that the best answer is
to use variables in $_SESSION? I am just learning PHP; while I'm
pretty good at C++, I've never done serious web programming before, so
while I had just learned about cookies, I haven't gotten to the
session tutorial yet.
Thanks again for the info. I have a follow-up question, if that's
alright...can anyone recommend a single PHP book that is good for
picking up PHP quickly for web application development that is geared
towards people with a programming background? I have the PHP for
Dummies guide somewhere, but as I recall it wasn't very advanced. I
read somewhere about the Safari books...are they any good?
>
Thank you everyone for the replies. I suppose that the best answer is
to use variables in $_SESSION? I am just learning PHP; while I'm
pretty good at C++, I've never done serious web programming before, so
while I had just learned about cookies, I haven't gotten to the
session tutorial yet.
>
Thanks again for the info. I have a follow-up question, if that's
alright...can anyone recommend a single PHP book that is good for
picking up PHP quickly for web application development that is geared
towards people with a programming background? I have the PHP for
Dummies guide somewhere, but as I recall it wasn't very advanced. I
read somewhere about the Safari books...are they any good?
>
I learnt a lot from Professional PHP5, ISBN 978-0764572821.
It also had a very useful chapter on session handling.
--
Andrew Poelstra apoelstra@wpsof tware.com
To email me, use the above email addresss with .com set to .net
>>Hi,
>>>
>>Does anyone know if it's possible to post to a page without using a
>>form? For example, if I want to pass a variable to another page
>>without using a cookie, is there a way to pass it using post?
>>>
>>Thank you,
>>Phil
>>>
>You can't post to a page. But why not put the variable in the $_SESSION
>array? That's what it's there for.
>>
>
$_SESSION still depends on cookies or URL rewriting behind the scenes to
keep its session data associated with the appropriate user.
>
>
And anyone who doesn't allow any of that isn't going to be visiting many
websites. Virtually every website (at least the good ones) which use
logins uses sessions in one language or another. And virtually every
site which saves data between pages uses sessions and/or cookies at some
time or another.
If you don't want to use cookies and don't want to use sessions, then
you must either post the data from a form or put in the in the URL.
That's the only way you can pass data between pages.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
Comment