Hi Everybody

Can anybody help me creating Button at runtime. My problem is I am having one form which contain 6 button to save 6 records details. Finally when six records save user goes to for next 6 records... So I need a new but same form which will again accept six records and six button to save details of the records.
So, how to create create same form with blank fields.
Hopefully I am clearly put my problem in front of you all

Thanking you all with regards

could u post your code here for further detail. so daniweb can help you very best.

This the code where I am entering records of item received now item can can 1 or more than one. So I limited 6 item can be entered on a page and if required then go for next page by clicking next button and enter next 6 items

<?php
require_once('connection.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PERMANENT LOAN LEDGER</title>
	<script type="text/javascript" language="javascript" >
	function fun1()
	{
	var se1,se2;
	se1=parseInt(document.tstest.t16.value);
	se2=parseInt(document.tstest.t17.value);
	document.tstest.t18.value=parseInt(se1)- parseInt(se2);
	//document.tstest.t18.value=parseInt(se1)+ parseInt(se2);
	//document.form1.s3.value=parseInt(se1)+ parseInt(se2)+parseInt(se3);
	}
	function b1(form)
	{
	var date=form.timestamp.value;
	var vno=form.t15.value;
	var qty=form.t16.value;
	var v4=form.t17.value;
	var v5=form.t18.value;
	var des=form.t7.value;
	var plllf =form.plllfno.value;
	//alert(v1);
	location = "http://localhost/CATASSET/pllwindow.php?s1="+date+"&s2="+vno+"&s3="+qty+"&s4="+des+"&s5="+plllf;
	
		//alert('NIIT');
	}	
	</script>
</head>

<body>
<CENTER>
<form name="tstest" action="pllwindow.php">
<table width="862" border="1">
  <tr>
    <td width="76" rowspan="2"><strong>In lieu of<br />
      IN- 806 </strong></td>
    <td width="100"><strong>LF NO. </strong></td>
    <td colspan="4"><div align="center"><strong>PERMANENT LOAN LEDGER </strong></div></td>
    <td width="55" rowspan="2"><strong>PLL<br />
      LF NO.</strong> </td>
    <td width="76" rowspan="2"><input name="plllfno" type="text" id="plllfno" /></td>
    <td width="37" rowspan="2"><strong>FUND</strong></td>
    <td width="37" rowspan="2"><select name="d5" id="d5">
      <?php $query = "SELECT * FROM fund"; 
		$result = mysql_query($query);
	    while($row = mysql_fetch_array($result))
		{ 
		echo "<option>$row[name]</option>";
		}?>
    </select>
    </td>
  </tr>
  <tr>
    <td height="60"><input name="t1" type="text" id="t1" size="15" /></td>
    <td width="95">PATT NO. </td>
    <td width="168"><input name="t2" type="text" id="t2" /></td>
    <td width="62"><strong>DENOM</strong></td>
    <td width="168"><input name="t3" type="text" id="t3" /></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center"><strong>INS VALSURA</strong></div></td>
    <td colspan="8" rowspan="3"><table width="762" border="1">
      <tr>
        <td width="53"><strong>SR.NO.</strong></td>
        <td width="693"><div align="center"><strong>DESCRIPTION</strong></div></td>
      </tr>
      <tr>
        <td><div align="center"><strong>1.</strong></div></td>
        <td><input name="t7" type="text" id="t7" size="80" /></td>
      </tr>
      <tr>
        <td><div align="center"><strong>2.</strong></div></td>
        <td><input name="t8" type="text" id="t8" size="80" /></td>
      </tr>
      <tr>
        <td><div align="center"><strong>3.</strong></div></td>
        <td><input name="t9" type="text" id="t9" size="80" /></td>
      </tr>
      <tr>
        <td><div align="center"><strong>4.</strong></div></td>
        <td><input name="t11" type="text" id="t11" size="80" /></td>
      </tr>
      <tr>
        <td><div align="center"><strong>5.</strong></div></td>
        <td><input name="t12" type="text" id="t12" size="80" /></td>
      </tr>
      <tr>
        <td><div align="center"><strong>6.</strong></div></td>
        <td><input name="t13" type="text" id="t13" size="80" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><strong>DEPT</strong></td>
    <td><select name="d6" id="d6">
       <?php
	   $query = "SELECT * FROM depatment"; 
		$result = mysql_query($query);
	    while($row = mysql_fetch_array($result))
		{ 
		echo "<option>$row[Dept_Name]</option>";
		}?>
    </select>    </td>
  </tr>
  <tr>
    <td><strong>Initial of person responsible for stores </strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="10"><table width="100%" border="1">
      <tr>
        <td width="71"><div align="center"><strong>Sr.No. </strong></div></td>
        <td width="97"><div align="center"><strong>Date</strong></div></td>
        <td width="147"><div align="center"><strong>Voucher No. </strong></div></td>
        <td width="145"><div align="center"><strong>Received</strong></div></td>
        <td width="145"><div align="center"><strong>Returned</strong></div></td>
        <td width="319"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remained</strong></td>
      </tr>
      <tr>
	 
	 <td><div align="center"><strong>1.</strong></div></td>
        <td><input type="Text" name="timestamp" value=""/>
		</td>
        <td><input name="t15" type="text" id="t15" /></td>
        <td><input name="t16" type="text" id="t16" onfocus="fun1();" /></td>
        <td><input name="t17" type="text" id="t17" onfocus="fun1();" /></td>
        <td><input name="t18" type="text" id="t18" disabled="disabled" value="0" />
        <input type="button" value="Save" name="bu1" onclick="b1(this.form);"  /></td>
	
      </tr>
      <tr>
	  
        <td><div align="center"><strong>2.</strong></div></td>
        <td><input name="t19" type="text" size="15" /></td>
        <td><input type="text" name="t20" /></td>
        <td><input type="text" name="t21" /></td>
        <td><input type="text" name="t22" /></td>
        <td><input type="text" name="t23" />
        <input type="submit" value="Save" name="Button"  /></td>

      </tr>
      <tr>
	
        <td><div align="center"><strong>3.</strong></div></td>
        <td><input name="t24" type="text" size="15" /></td>
        <td><input type="text" name="t25" /></td>
        <td><input type="text" name="t26" /></td>
        <td><input type="text" name="t27" /></td>
        <td><input type="text" name="t28" />
		<input type="submit" value="Save" name="Button"  /></td>
	 
      </tr>
      <tr>
	  
        <td><div align="center"><strong>4.</strong></div></td>
        <td><input name="t29" type="text" size="15" /></td>
        <td><input type="text" name="t30" /></td>
        <td><input type="text" name="t31" /></td>
        <td><input type="text" name="t32" /></td>
        <td><input type="text" name="t33" />
		<input type="submit" value="Save" name="Button"  /></td>
	  
      </tr>
      <tr>
	 
        <td><div align="center"><strong>5.</strong></div></td>
        <td><input name="t34" type="text" size="15" /></td>
        <td><input type="text" name="t35" /></td>
        <td><input type="text" name="t36" /></td>
        <td><input type="text" name="t37" /></td>
        <td><input type="text" name="t38" />
		<input type="submit" value="Save" name="Button"  /></td>
	  
      </tr>
      <tr>
	  
        <td><div align="center"><strong>6.</strong></div></td>
        <td><input name="t39" type="text" size="15" /></td>
        <td><input type="text" name="t40" /></td>
        <td><input type="text" name="t41" /></td>
        <td><input type="text" name="t42" /></td>
        <td><input type="text" name="t43" />
		<input type="submit" value="Save" name="Button"  /></td>
	 
      </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="11"><div align="right">
	<center>
	<input type="submit" name="bsave" value="SAVE" />
	<input type="button" name="bcommit" value="COMMIT" />
      <input type="button" name="bnext" value="NEXT" />
	    <input type="button" name="bprint" onclick="window.print()" value="PRINT" />
		</center>
    </div></td>
  </tr>
</table></form></CENTER>
||<a href="member.php"> GO TO INDEX</a>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.