passing values from dynamic form to another php page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

i m generating a dynamic form (no. of fileds depend upon user selection from previous page).
On this page user enters values into form fields
and i want to acess them on next page.
///////////////////////////file1.php////////////////////////////////////////

<?php require_once('../Connections/cnn.php'); /////////////////////////////////////////////////
	$cID=$HTTP_POST_VARS['select1']; //echo $cID;
	$query1 =  "SELECT * FROM categories where cat_id=$cID" ;
	$result1 = mysql_query($query1, $cnn) or die(mysql_error());
	$row1=mysql_fetch_array($result1);
	$cat_name=$row1['cat_name']; //echo $cat_name;
	$cat_image=$row1['cat_image']; //echo $cat_name;
	$cat_intro_text=$row1['cat_intro_text']; //echo $cat_name;
	$attributes_list =$HTTP_POST_VARS['sql_query'];
	echo $attributes_list;
	$fldslist=split(",",$attributes_list);
	$fldCount=count($fldslist);
	$_SESSION['num_fields']=$fldCount;
	$_SESSION['list_fields']=$fldslist;
?>
<html>
<head>
</head>
<body>
<form name="sqlform" action="table1_process2.php" method="post" enctype="multipart/form-data" >
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <td width="13">&nbsp;</td> <td width="654" valign="top" align="center"><font color="ffffff"><strong>Welcome to the Administration Panel</strong></font></td>
                 <td width="12">&nbsp;</td>
                 <td width="14">&nbsp;</td>
               </tr>
				<tr>
				  <td>&nbsp;</td>
				  <td valign="top">&nbsp;</td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			  </tr>
				<tr>
				  <td>&nbsp;</td>
<td height="26" align="center"><font color="ffffff" size="+1">Category:&nbsp;&nbsp;<?php echo $cID.".&nbsp;".$cat_name;?></font></td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			  </tr>
				<tr>
                 <td>&nbsp;</td>
                 <td valign="top"><div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                       <td>&nbsp;</td>
                       <td width="40">&nbsp;</td>
						<td>&nbsp;</td>
                     </tr>
                     <tr align="left">
<td align="left"><img src="../images/categories/<?php echo $cat_image;?>" width="80" height="100"></td>
                       <td >&nbsp;</td>
<td align="justify" class="highlight"><?php echo $cat_intro_text; ?></td>
                     </tr>
                     <tr>
                       <td>&nbsp;</td>
						<td>&nbsp;</td>
                       <td>&nbsp;</td>
                     </tr>
                   </table>
                 </div></td>
                 <td>&nbsp;</td>
                 <td>&nbsp;</td>
			    </tr>
				<tr>
				  <td>&nbsp;</td>
<td align="center"><font class="highlight" size="+1">Product Attributes</font></td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			    </tr>
				<tr>
				  <td>&nbsp;</td>
				  <td valign="top">
<table width="95%" align="center" border="1" cellpadding="0" cellspacing="0">
				  	<tr class="highlight">
<?php for ($i=0;$i<$fldCount;$i++)
					{
						echo "<td>$fldslist[$i]</td>";
					}	
					?>
					<td>Action</td>
					</tr>
					<tr class="highlight">
<?php for ($j=0;$j<$fldCount;$j++)
					{
echo "<td><input type='text' name='$fldslist[$j]' size='8' value='' maxlength='8'></td>";
						
					}	
					?>
<td><input type="submit" name="submit" value="Add Product" onClick="return validateForm(this)" onKeyPress="return validateForm(this)">
					<input type="hidden" name="cat_id" value="<?php echo $cID;?>">
					<input type="hidden" name="MM_insert" value="sqlform"></td>
					</tr>
				  	</table>
				  </td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			    </tr>
				<tr>
				  <td>&nbsp;</td>
				  <td valign="top" >&nbsp;</td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			  </tr>
				<tr>
				  <td>&nbsp;</td>
				  <td valign="top" >&nbsp;</td>
				  <td>&nbsp;</td>
				  <td>&nbsp;</td>
			  </tr>
         </table></form>

</body>
</html>

//////////////////////////////////////////////////////////////////////////////
now i want to access the values from input fields on next page?
can somebody give me idea how to pass all form field values to next page in this context??

regards
hope

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux