|
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]
|