473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

To pass the contents of a php page into a text area

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("select * from services where id='$id[$i]'");

$r1= mysql_fetch_array($r);
echo "<tr><td>$r1[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='searchbox' name='total' value='<? echo "$".$d; ?>'></td></tr>
<tr><td></td><td align=left><input type='button' value='send' href="www.paypal.com"></td></tr>


</table>
</div>
</div>
</body>
</html>
Jan 12 '08 #1
2 1487
Could you just do this?..
[HTML]<html><head></head><body>
<form action="whatever" method="post">
<textarea name="my_textarea">
<?php
include 'page_that_gets_stuff_from_database.php';
?>
</textarea>
</form></body></html>[/HTML]
Jan 12 '08 #2
Markus
6,050 Expert 4TB
Could you just do this?..
[HTML]<html><head></head><body>
<form action="whatever" method="post">
<textarea name="my_textarea">
<?php
include 'page_that_gets_stuff_from_database.php';
?>
</textarea>
</form></body></html>[/HTML]
That does seem so much easier..
Jan 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Arun Nair | last post by:
Hi, I have the following jsp page. I am able to view only a part of it(until the occurence of the first City text box). If i remove the first few fields from the page, I am able to see a few...
0
by: iffy agbim | last post by:
I have a form that displays information selected from an Access Data base. A select statement is used to do this on my asp page SQLQuery = "SELECT * FROM tblopgaCOm2 WHERE billNo = '" &...
1
by: Praetorian Guard | last post by:
Hello, I have a form with a textarea and a submit button and that button will call an asp file and this file will query the database. My question is how do I pass the data to the html form so...
3
by: DCB | last post by:
Hello. I have an easy question, likely, that has me in a headspin. I have an include file to a frames based site that basically forces frames on the end user if they visit the site and hit a...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
2
by: bs9999 | last post by:
I'm using IFRAME to connect back to my ASP.NET page in order to fetch the FreeBox HTML Editor html contents and scripts (i do this apprach because the html editor is fairly heafty to send to the...
7
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and...
9
by: mevryck | last post by:
Greetings I have a huge Javascript with inclusion of external scripts and all. I got this by doing a XSLT . Now I have the contents in a Javascript variable, but I'm not able to update the...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.