Reply to Re: Modify $_POST

Your name:

Reply:


Posted by Kenneth Downs on 07/24/06 12:04

Simon Rigby wrote:

> Hello folks,
>
> Ive seen lots of recommendations to not try to do what Im trying to do
> but let me put it this way and hopefully someone can tell if this is a
> good idea or not (or an alternative).
>
> What Im trying to do is this. I have a series of links that when
> clicked will navigate to a common page passing in a value encoded in
> the link. For reasons not worth going into I cant use a querystring.
>
> I was hoping to call a javascript function from the onclick event of
> the link, then assign a new $_POST variable and then submit the form
^^^^^^^^^^^^^^^

You probably mean assign a hidden variable, which will then come back as a
$_POST variable, yes?

Your HTML might be:

<form....
<input type="hidden" name="the_variable" value="">


<a href="SetAndPost('x')">Click here for X</a>
<a href="SetAndPost('y')">Click here for Y</a>

</form>

This code assumes you write a routine called "SetAndPost" that sets the
value of the hidden variable and then submits the form.

--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)

[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

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