[FX.php List] php, filemaker and html forms

Nick Trenary nick at mail.crlibrary.org
Tue Nov 2 09:52:48 MST 2004


That did the trick.  I was starting to get things figured out late Friday, 
your code put me over the top.

Thanks again,
Nick

At 06:10 PM 10/29/2004, you wrote:
>Nick,
>
>I'll try and help you out, but it's tricky to gauge from what you've put 
>below how much you already have working... ;-)
>
>[Code]
>.... [php code]...
>//Does this php code include a call to a database in which you get the 
>value from the first database which you want to 'pass on'...??? something like;
>
>include_once("/FX.php");
>include_once("serverVariables.php");
>
>   $classQuery = new FX($serverIP, $serverPort);
>   $classQuery->SetDBData("firstDatabase.fp5", "web");
>   $classQuery->AddDBParam(....Whatever the search criteria are...);
>   $classData = $classQuery->FMFind();
>   $classKey = key($classData['data'];
>
>
>?>
>
><form action="confirm.php" method="post">
><input type="hidden" name="-db" value="dbname.fp5">   // Is the extension 
>needed?
>//Not required put this in confirm.php
><input type="hidden" name="-lay" value="web">
>//Not required forms part of your initiation of db in confirm.php
><input type="hidden" name="-format" value="confirm.php">
>//Not required at all, the 'action' in the form tag above has specified 
>this already
><input name="First_name" type="text" size="20">
><input name="Last_name" type="text" size="20">
><input name="Phone_number" type="text" size="20">
>
><?php
>  //  echo('input type=hidden name=ClassID value=' . $value['ClassID'][0] 
> . '>');
>//this is the right idea, but not quite right...
>//presuming as I am that in the php code block above you've got the vale 
>from the first database, and the key value of the data
>//then here you would;
>
>  echo "<input type=hidden name=ClassID value=" . 
> $classData['Data'][$classKey]['ClassID'][0] . ">";
>?>
><input type="Submit" name="new" value="Submit reservation">
>[/Code]
>
>Then on confirm.php you'd have (something like);
>
>
>
><?php
>
>include_once("/FX.php");
>include_once("serverVariables.php");
>
>   $newQuery = new FX($serverIP, $serverPort);
>   $newQuery->SetDBData("dbname.fp5", "web");
>   $newQuery->AddDBParam('First_name', $_REQUEST['First_name']);
>   $newQuery->AddDBParam('Last_name', $_REQUEST['Last_name']);
>   $newQuery->AddDBParam('Phone_number', $_REQUEST['Phone_number']);
>   $newQuery->AddDBParam('ClassID', $_REQUEST['ClassID']);
>   $newData = $newQuery->FMNew();
>   $newKey = key($contentData['data']);
>
>?>
>
><html>
><body>
><p>Dear <?php echo $newData['data'][$newKey]['First_name'][0]; ?>,</p>
><p>Thanks for filling in the details on our website they have been save 
>for future reference.</p>
><p>Cheers</ br>Me</p>
></body>
></html>
>
>Hope this helps and makes sense...let me know if you need further 
>assistance...
>
>Cheers
>Steve
>
>Are these the correct input names to use?  In this case is the form action 
>page the same page as the -format page?
>
>Thanks in advance,
>Nick
>
>----
>Nick Trenary
>Computer Information Systems Analyst
><http://www.crlibrary.org/>Cedar Rapids Public Library
>Office:(319) 398-5145 x267
>Work cell: (319) 310-7699
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20041102/4c517525/attachment-0001.html


More information about the FX.php_List mailing list