Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 15th, 2005, 07:15 PM
Registered User
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing FORM to FORM to PHP

I send a single Part Number from an HTML form, and it passes to this PHP, which has two function:

1. It displays all the current data for that part number
2. It create another HTML form, which allows you do edit the data for that part no. via another PHP script. The only thing I don't like is that you have to enter the Part Number into the new form.

QUESTION: Is there a way to pass the HTML form input from the first form to the SECOND HTML FORM within this PHP script, so I don't have to re-enter the Part Number????? (Be nice... I'm new at this ;) )

<<<<<<<<<<<My PHP Script>>>>>>>>>>
<body background="tekbg.gif" bgcolor=#d9d9d9>
<h2>Teknetix Component Library Editor</H2>



$result = mysql_query
    SELECT * FROM lbryperm

IF ($row=mysql_fetch_array($result))
        PRINT ("<h4>Teknetix Part Number:&nbsp;&nbsp;");
        print $row["TEK_PART_NUMBER"];
        print ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
        PRINT ("Revision:&nbsp;");
        print $row["REVISION"];
        print (" <br> ");
        PRINT ("Part Catagory:&nbsp;&nbsp;");
        print $row["PART_CATAGORY"];
        print ("&nbsp;");

        PRINT ("Inspection Notes:&nbsp;&nbsp;");
        print $row["INSPECTION"];
        print (" <br><br><IMG SRC=LINE.JPG></h4>");
    while($row = mysql_fetch_array($result));
else {

<form name="TEKPARTEDITOR" method="post" action="TEKpartEDITOR.php">

<h3> Enter the Part Number and Values you wish to change:

<<<This is the same Part Number that was passed from the last form>>>

Tek_Part_Number: &nbsp;
<input type="TEXT" SIZE="8" name="TEK_PART_NUMBER" > &nbsp;

Revision Number: &nbsp;
<input type="text" SIZE="4" name="REVISION1"> &nbsp;
Part Catagory: &nbsp;
<input type="text" SIZE="10" name="PART_CATAGORY1"> &nbsp;
Configuration: &nbsp;
<input type="text" SIZE="10" name="CONFIGURATION1"> &nbsp;<br>
Value: &nbsp;&nbsp;
Inspection Notes: &nbsp;&nbsp;
<input type="text" SIZE="100" name="INSPECTION1"> &nbsp;
<input type="submit" name="Submit" value="Submit">
Old August 17th, 2005, 03:32 PM
Friend of Wrox
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul

I say some ideas:

You may use JavaScript to assemble your one FORM parts in >1 layers ( <DIV>s ); show/hide ( back/forward ) them client-side and make 1 request to server in end.

If using by PHP, store previous old FORM values in hidden new FORM fields, transit this to final PHP page, that then do final action like insert/update to db.


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing unique record from form to form Baconant Beginning VB 6 1 January 2nd, 2008 06:20 PM
passing a variable from one form to another madhukp VB How-To 4 January 19th, 2005 12:45 AM
Passing Value from main form to Popup Form smartgir Access VBA 0 February 26th, 2004 06:26 PM
passing a php oop object in a form buckarette Pro PHP 2 December 24th, 2003 07:49 PM
Passing values to a form mschenk Access VBA 4 November 30th, 2003 11:39 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.