Passing LARGE (1500-2500 chars) variable from JScript to PHP?
News.Fbcc.Com 12 August 2001 21:55:16
I want to pass a large (easily 1500-2500 characters) variable between a DHTML object using Jscript over to a PHP script to ultimately update a MySQL database. I know that I can pass a variable along with the link, i.e. location.href=etc. etc., but I believe there is a limit on the size of an href. What I am doing is editting text and am using MSIE specific functions to create HTML on the fly which I then want to pass to a PHP script to update my database.
Any help would be SINCERELY appreciated!! Merci, (or is that mercy?) Andre
Inércia Sensorial 13 August 2001 01:08:47 [ permanent link ]
I don't think it is possible to pass so much chars in a href, or URL for the matter. Is it really necessary? Couldn't you first write somewhere (db/file) those chars and retrieve it later, referencing it on the href?
--
Julio Nobrega.
2B||!BB - That's the question.
"News.Fbcc.Com" <AndreBajew@KatyTexas.Com> wrote in message news:20010812175808.8234.qmail@pb1.pair.com...> I want to pass a large (easily 1500-2500 characters) variable between a> DHTML object using Jscript over to a PHP script to ultimately update a MySQL> database. I know that I can pass a variable along with the link, i.e.> location.href=etc. etc., but I believe there is a limit on the size of an> href. What I am doing is editting text and am using MSIE specific functions> to create HTML on the fly which I then want to pass to a PHP script to> update my database.>
Any help would be SINCERELY appreciated!!> Merci, (or is that mercy?)> Andre>
Richard Lynch 13 August 2001 01:57:43 [ permanent link ]
Any server along the way is allowed to chop GET requests to, like, 255 characters.
Any server along the way is allowed to chop POST requests to, like, 1024? characters.
*MOST* won't chop either, any more, but you're safe with POST instead of GET.
You *COULD* however, try this to guarantee delivery:
Breaking up the HTML into "packets" and POST each packet successively with a numbering scheme whereby PHP holds each packet in a temp table and assembles them when all packets have arrived. Dunno if JavaScript will let you execute multiple POSTs and ignore the returning HTML or not though...
Your best bet by far is to have JavaScript execute a POST with a FILE UPLOAD. You'll have to figure out if JavaScript can do that, though...
-- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: News.Fbcc.Com <AndreBajew@KatyTexas.Com> Newsgroups: php.general To: <php-general@lists.php.net> Sent: Sunday, August 12, 2001 12:55 PM Subject: Passing LARGE (1500-2500 chars) variable from JScript to PHP?
I want to pass a large (easily 1500-2500 characters) variable between a> DHTML object using Jscript over to a PHP script to ultimately update a
MySQL> database. I know that I can pass a variable along with the link, i.e.> location.href=etc. etc., but I believe there is a limit on the size of an> href. What I am doing is editting text and am using MSIE specific functions> to create HTML on the fly which I then want to pass to a PHP script to> update my database.>
Any help would be SINCERELY appreciated!!> Merci, (or is that mercy?)> Andre>
News.Fbcc.Com 13 August 2001 05:41:54 [ permanent link ]
Wow, seems pretty obvious now that you've said it, Richard, but then that's how it always works.
Yes, I can just write it all to a file and then upload that to the server then can grab it from there with PHP. Ahhh, life is GOOD! Worst case, the the user will have to click twice, once for the upload and again to confirm the update. AWESOME! You have no idea how stuck I was on that on. I'll have a look/listen at some of those CD's.
Thanks again! Andre
"Richard Lynch" <ceo@l-i-e.com> wrote in message news:00ef01c1237a$74dff0a0$6401a8c0@Lynchux100...> Any server along the way is allowed to chop GET requests to, like, 255> characters.>
Any server along the way is allowed to chop POST requests to, like, 1024?> characters.>
*MOST* won't chop either, any more, but you're safe with POST instead of> GET.>
You *COULD* however, try this to guarantee delivery:>
Breaking up the HTML into "packets" and POST each packet successively with
numbering scheme whereby PHP holds each packet in a temp table and
assembles> them when all packets have arrived. Dunno if JavaScript will let you> execute multiple POSTs and ignore the returning HTML or not though...>
Your best bet by far is to have JavaScript execute a POST with a FILE> UPLOAD. You'll have to figure out if JavaScript can do that, though...>
--> WARNING richard@zend.com address is an endangered species -- Use> ceo@l-i-e.com> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm> Volunteer a little time: http://chatmusic.com/volunteer.htm> ----- Original Message -----> From: News.Fbcc.Com <AndreBajew@KatyTexas.Com>> Newsgroups: php.general> To: <php-general@lists.php.net>> Sent: Sunday, August 12, 2001 12:55 PM> Subject: Passing LARGE (1500-2500 chars) variable from JScript to PHP?>
I want to pass a large (easily 1500-2500 characters) variable between a> > DHTML object using Jscript over to a PHP script to ultimately update a> MySQL> > database. I know that I can pass a variable along with the link, i.e.> > location.href=etc. etc., but I believe there is a limit on the size of
href. What I am doing is editting text and am using MSIE specific> functions> > to create HTML on the fly which I then want to pass to a PHP script to> > update my database.> >
Any help would be SINCERELY appreciated!!> > Merci, (or is that mercy?)> > Andre> >
News.Fbcc.Com 13 August 2001 05:43:05 [ permanent link ]
Thank you for the response Julio! That's what I will do is write to a file and then upload that file. From there I can have PHP get to that file for insert/update into a MySQL database.
Thanks much! Andre
"InéRcia Sensorial" <inerte@hotmail.com> wrote in message news:20010812210410.959.qmail@pb1.pair.com...> I don't think it is possible to pass so much chars in a href, or URL for> the matter. Is it really necessary? Couldn't you first write somewhere> (db/file) those chars and retrieve it later, referencing it on the href?>
-->
Julio Nobrega.>
2B||!BB - That's the question.>
"News.Fbcc.Com" <AndreBajew@KatyTexas.Com> wrote in message> news:20010812175808.8234.qmail@pb1.pair.com...> > I want to pass a large (easily 1500-2500 characters) variable between a> > DHTML object using Jscript over to a PHP script to ultimately update a> MySQL> > database. I know that I can pass a variable along with the link, i.e.> > location.href=etc. etc., but I believe there is a limit on the size of
href. What I am doing is editting text and am using MSIE specific> functions> > to create HTML on the fly which I then want to pass to a PHP script to> > update my database.> >
Any help would be SINCERELY appreciated!!> > Merci, (or is that mercy?)> > Andre> >
I want to pass a large (easily 1500-2500 characters) variable between a> DHTML object using Jscript over to a PHP script to ultimately update a
MySQL> database. I know that I can pass a variable along with the link, i.e.> location.href=etc. etc., but I believe there is a limit on the size of an> href. What I am doing is editting text and am using MSIE specific functions> to create HTML on the fly which I then want to pass to a PHP script to> update my database.