You are here: Re: form submit « All PHP « IT news, forums, messages
Re: form submit

Posted by The Eclectic Electric on 12/21/06 09:58

"pu" <user@user.user> wrote in message
news:gboih.11222$HU.8423@news-server.bigpond.net.au...
> Hi
>
> I have the following code and wish for the Save button to be sent to
> another form.
>
> e.g.
> ===begin===
> <?
> etc etc
>
> if(ISSET($_POST['submitclient'])) {
> // read in values from mysql database
> }
> if(ISSET($_POST['submitsender'])) {
> // read in values from mysql database
> }
> // $clientname=. have correct values
> // $sendername=... have correct values
>
> echo "<form action=self.php method=post>";
> echo "<input type=text name=clientname value='".$clientname."'>";
> echo "<input type=submit name=submitclient value='Get Client'>";
> echo "<input type=text name=sendername value='".$sendername."'>";
> echo "<input type=submit name=submitsender value='Get Sender'>";
> echo "<input type=submit name=submitsave value='SAVE'>";
> echo "</form>";
> ===end===
>
> File savedata.php
> ===begin===
> etc etc
> $clientname=$_POST['clientname'];
> etc etc reading in the POST values.
> $q="insert into tablename (clientname, sendername, etc, etc)
> values('".$callername."','",$sendername,' etc etc
> etc etc
> ===end===
>
> How do I post the form values to a separate save form, say, savedata.php,
> instead of self.php, if I click the SAVE button?
>
> Regards
> Leigh
>

Think you need to explain this more clearly. Can you not just change your
form declaration to <form action="savedata.php" method="post">?

+e

 

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

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