Jump to content

Creating Sticky Forms for Multiple Form Fields


Modernvox

Recommended Posts

Hi Guys,

 

I am attempting to create a program for a local auction house.

 

I arrived at a stand still on a certain issue which is creating a sticky form. On the "enter auction details page" the user will be entering data as the auction is in session.

 

1. item Description

2. Item Price

3. Bidders Id

4. Qty

 

Of course it would be repetitive to require the user to keep entering the same data for every bidder, so I want to stick the obvious fields which are "item description" & "Item Price" as these don't change until a new item comes up for sale.

 

As of know I am processing the input on a separate page which records all input to the database with a redirect back to the  "enter auction details page". I have tried many times to get the item description and item price fields to stick. These would need to change as the user moves onto the next item in which the description and price would change as well.

 

Here is my current code for this part:

<?php
session_start(); 
$field_itemDescription = ""; //iyem description, default as blank
if (isset($_SESSION['itemDescription'])) $itemDescription = $_SESSION['itemDescription'];
?>
<form action="record_trans.php" method="post">
<font face= "calibri" size= "4">
<table>

<tr>  <td><b>Item Description:</b></td>
<td><input type= "text" name= "itemDescription" size= "30" value="<?php echo $itemDescription;?>"></td>
</tr>
<tr>   <td><b>Item Price:</b></td>

<td><input type= "text" name= "itemPrice" size= "5" value="<?php echo $itemPrice;?>"> </td>
</tr>
</tr>   <td><b>Winning Bidders:</b></td>
<td><input type="text" name= "bidderId" size= "5" />
</td>
</tr>
<tr>   <td><b>How many deals?:</b></td>
<td><input type="text" name= "itemQty" size= "3" value= "1" /></td>
</tr>
</table>

<center><input type="submit" name="submit" value= "Save & Cont." 
" /></center>
</form></font>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.