Reply to Re: HTTP POST from PHP using a link

Your name:

Reply:


Posted by The Natural Philosopher on 10/06/73 12:00

Michael Fesser wrote:
> .oO(Manuel Lemos)
>
>> on 01/14/2008 11:39 PM trpost@gmail.com said the following:
>>> I tried the Class and it looks to be able to send POST data to a page
>>> and request back the results. I am looking to actually goto the page
>>> as if you had clicked on the link. I basically created an app that
>>> sometimes tries to send data to a page that exceeds the max length
>>> allowed in the URL. What are options for getting around that limit. I
>>> could see using a form if I had just one link, but I have hundreds and
>>> can't think of a way to just send the data from the link I click on if
>>> I used a form.
>> I think the limit is in the browsers, something like 255 characters. So
>> I think you can submit a GET request using that class to an URL without
>> that limit.
>
> There are also buffer limits in the web servers. For sending large
> amounts of data to a script POST is the correct way.
>
> Micha
You can do this with javascript.

Essentially use the onclick() stuff to poke the right data into a HIDDEN
variable, and POST that to the form

So you have somewhere
<form method="post">
<INPUT type="hidden" name="postvariable1" id="p1" value="">

<div onclick="do_my_stuff("a very long string")";>Click here to go
somewhere else
</div>
</form

and a javascript..
<script>
function do_my_stuff (p)
{
getElemntById[['p1']=p;
document.form[0].submit();
}
</script>

Syntax is guaranteed to be wrong, but thats the principle

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация