Hi, this is my file which showing result. I put check box for each result.

<?
	include("config.php");
	
	echo "<form method=post name=myform action=b.php >";
$result=mysql_query("Select Distinct region,MaintainedBy From info");

 while($ro=mysql_fetch_array($result))
 {
                  

 echo "<tr bgcolor=#FFFFFF style=color:#000000;>";  
	echo "<td>" . $ro[0] . "</td>";
	echo "<td>" . $ro[1] . "</td>";
	
	echo "<td><input name=id[] type=checkbox value='{$ro[0]}`{$ro[1]}' /> </td>";
	echo      "</tr>";
 }
 echo "<input type=submit style=width:100px name=itmlist value=Add To List/>";
 echo "</form>"
?>

and action file of a.php is b.php

<?
	include("config.php");
if($_POST['id']=='') die("Please Select An Item To Add in List <a href='a.php'><b>Go BACK</b></a>");

 foreach ($_POST['id'] as $tab)
   
      			{
				
			$arr=split("`",$tab);
			echo "<table width=50% bgcolor=#EFEFEF >";
			echo "<tr bgcolor=#FFFFFF style=color:#000000;>";  
	echo "<td>" . $arr[0] . "</td>";
	echo "<td>" . $arr[1] . "</td>";
	echo "<td><input name=id[] type=checkbox value='{$ro[0]}`{$ro[1]}' /> </td>";
			echo "</tr>";
			echo "</table>";
			}
?>

Now I want to add one input field in b.php for amount and store its value in check box.

First code is a.php and Second code is b.php.
I transfer values from a.php to b.php on basis of checkbox.
In b.php I used split array function to get values. Now I want an input box here.

What is need for inputbox,
do you want to save it in db?
If yes then here there is no any uniqueid's concept.

All the values extracted from DB like Person name , Addresss but amount will be added manually on b.php so I need input box

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.