0

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.

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by ayesha789
0

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.

0

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.