Hi,
I want to pass the entire contents of a php page into a text area in another php page..The php page fetches some data from the database.I want those data to be displayed in a text area in another php page.Pl guide me
php code
<?php
if(isset($_POST['id']))
{
$id = $_POST['id'];
$n= count($id);
echo"<table border='0' cellspacing=0 cellpadding=1 width='80%'>";
echo " <caption class='h3'>The Services you have selected are</caption><tr class='maroon'> <th>Service</th><th>Cost</th></tr>";
for($i=0; $i< $n ; $i++)
{
$r = mysql_query("se lect * from services where id='$id[$i]'");
$r1= mysql_fetch_arr ay($r);
echo "<tr><td>$r 1[service]</td><td align=left>$$r1[service_cost]</td></tr>";
$D[] .=$r1[service_cost];
}
$d= array_sum($D);
}
?>
<tr><td class='maroon'> Total</td>
<td><input type='text' width='10px' class='searchbo x' name='total' value='<? echo "$".$d; ?>'></td></tr>
<tr><td></td><td align=left><inp ut type='button' value='send' href="www.paypa l.com"></td></tr>
</table>
</div>
</div>
</body>
</html>
I want to pass the entire contents of a php page into a text area in another php page..The php page fetches some data from the database.I want those data to be displayed in a text area in another php page.Pl guide me
php code
<?php
if(isset($_POST['id']))
{
$id = $_POST['id'];
$n= count($id);
echo"<table border='0' cellspacing=0 cellpadding=1 width='80%'>";
echo " <caption class='h3'>The Services you have selected are</caption><tr class='maroon'> <th>Service</th><th>Cost</th></tr>";
for($i=0; $i< $n ; $i++)
{
$r = mysql_query("se lect * from services where id='$id[$i]'");
$r1= mysql_fetch_arr ay($r);
echo "<tr><td>$r 1[service]</td><td align=left>$$r1[service_cost]</td></tr>";
$D[] .=$r1[service_cost];
}
$d= array_sum($D);
}
?>
<tr><td class='maroon'> Total</td>
<td><input type='text' width='10px' class='searchbo x' name='total' value='<? echo "$".$d; ?>'></td></tr>
<tr><td></td><td align=left><inp ut type='button' value='send' href="www.paypa l.com"></td></tr>
</table>
</div>
</div>
</body>
</html>
Comment