Reply to Re: About "posting" forms

Your name:

Reply:


Posted by Paul Lautman on 06/07/06 11:44

tony@tony.com wrote:
> Is it possible to use the post method to send a form from PHP without
> having to put the form in a html page?
>
> <form action="https://www.mysite.com/cgi/incoming.php" method="post">
> <input type="hidden" name="data01" value="12">
> <input type="hidden" name="data02" value="rejected">
> <input type="hidden" name="star" value="sirius">
> <input type="image" src="https://www.mysite.com/grid001/image1.gif"
> border="0" name="submit" alt="send data">
> </form>
>
> What I would like to do is make the use of this form as invisible to
> the user as possible by
>
> 1. getting rid of the image (but then how do I "post" it)
> 2. putting PHP variables into the value fields
> 3. send the form
>
> The PHP variables are set up as in
> $data01 = 12;
> $data02 = 'rejected'
> etc
> then
>
> after just including it as in "include_once('senddata.php'); the form
> above is in senddata.php and just gets posted
>
> I've been looking at this and can't see how without having to include
> the form on a html page. I looked at document.write but that again is
> javascript.
>
> Can this be done with just PHP?
>
> thanks
>
> tony

The POST method is used to send data from a web page to the server so that
you can use it in things like php variables.
You don't need an image or even a button to submit a form. A text input box
will work to submit a form just by pressing the enter key.
What you need to do is to explain what you ultimately want to happen.

[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

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