You are here: Re: posting form data to two scripts at once « PHP Programming Language « IT news, forums, messages
Re: posting form data to two scripts at once

Posted by Curtis on 12/18/06 22:26

A better idea might be to submit to the first script, which will then
also use cURL or fsockopen to make the POST or GET request to the
second script. You can even use SSL with the cURL library.

http://php.net/curl
http://php.net/fsockopen

On Dec 17, 7:34 am, "seaside" <seaside...@mac.com> wrote:
> Norman Peelman schrieb:
>
>
>
> > From: "Norman Peelman" <npeel...@cfl.rr.com>
> > Subject: Re: posting form data to two php scripts at once
> > Date: Sunday, December 17, 2006 12:06 AM
>
> > <one.1m...@gmail.com> wrote in message
> >news:1166317725.715320.309280@80g2000cwy.googlegroups.com...
> > > How do i post the form data to different php files at once. I tried the
> > > following code but it doesn't work. the data is sent only to the first
> > > php file.
>
> > > <form method="post" action="insert.php" action="mail.php">
> > > Email<input type="text" name="email" value ="" size="20" />
> > > <input type="submit" value="submit" />
> > > </form>
>
> > > Is there a solution?
>
> > Yes, you just have to call the second script from the first. You could
> > try:
>
> > at the end of the first script---
> > header("Location:
> > hxxp://your.domain.com/second_script.php?var1=$var1&var2=$var2");Please note, that - using this method - you forward a GET request,
> which is
> restricted regarding the amount of data transferred. Moreover, you
> might need to
> change your PHP scripts to read $_POST and $_GET.

 

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

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