You are here: Re: [PHP] POST variables from a link...and popup new window « PHP « IT news, forums, messages
Re: [PHP] POST variables from a link...and popup new window

Posted by emre on 10/16/19 11:12

<?php
echo '
<form name=FormToBeSubmitted action=targetpage.php method=post>
</form>
<script language=javascript>
document.FormToBeSubmitted.submit();
</script>
';
?>

you can also set some variables to your form,
for example in the script body put this code to submit a form variable named
'testvariable'
//first define the value somewhere before the <script> tags,
$stringstr=' this is gonna be submitted also'

then between <script> tags put this string below:

document.getElementById('testvariable').value=$submitstr;

if you need a adynamic value to be subbmitted than just change var

hope it helps,


----- Original Message -----
From: "Richard Lynch" <ceo@l-i-e.com>
To: "james tu" <jtu@esidesign.com>
Cc: <php-general@lists.php.net>
Sent: Wednesday, March 30, 2005 12:34 AM
Subject: Re: [PHP] POST variables from a link...and popup new window


> On Tue, March 29, 2005 1:09 pm, james tu said:
>> I have a link that, when clicked on, pops up a new window.
>> I want to use the POST method in order to pass information. Right now
>> I'm appending the parameters to the URL of the link and using GET to
>> retrieve the name/value pairs.
>
> <form target="_blank" ... >
>
> You may be able to use onSubmit or something similar to make the new
> window be the size/look you want with JavaScript.
>
> There's no PHP involved here, though, so maybe ask on an HTML and/or
> JavaScript forum for better answers.
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

 

Navigation:

[Reply to this 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

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