473,800 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

15 New Member
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>
Jan 12 '08 #1
2 1506
adamalton
93 New Member
Could you just do this?..
[HTML]<html><head></head><body>
<form action="whateve r" method="post">
<textarea name="my_textar ea">
<?php
include 'page_that_gets _stuff_from_dat abase.php';
?>
</textarea>
</form></body></html>[/HTML]
Jan 12 '08 #2
Markus
6,050 Recognized Expert Expert
Could you just do this?..
[HTML]<html><head></head><body>
<form action="whateve r" method="post">
<textarea name="my_textar ea">
<?php
include 'page_that_gets _stuff_from_dat abase.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
2300
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 more fields at the bottom. My form class contains all the properties that are used in the jsp page. I don't know what I am doing wrong. I am using struts1.1 & JDK 1.4.2.
0
1119
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 = '" & Request.Form("BILLNO") & "' AND area LIKE 'AUDIT'" billNo and area are the 2 fields used together to make the record we need unique. example Bill d456(billNo) can be assigned to various depts(area). as many depts as it is assigned rep the many...
1
1446
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 that it will be displayed in the textarea? Thank you in advance.
3
32152
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 non-frames created page... Simply, it is: if (parent != self)
2
3818
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 provide text area where the user can insert big chunks of text and submit it all to the server paragraph by paragraph. The requirement is to do a Spell Check AND Grammar Check in the text area. I did look at lot of possible third
2
2458
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 user when most dont use it on our site instead deferring to a user request before actually sending down the code via AJAX or in this case an IFRAME). append all script tags and relevant html elements into my main page's DOM, outside of the iframe....
7
2089
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 the control F.Result (which is just under the textarea) fully visible at the bottom of the window. What's the right, or best, way to do that? It's right in IE6 at present, and near enough so in FF2 if there's only a single tab. But the "tab...
9
4035
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 element with the javascript contents. But when viewed as a seperate HTML file with the below contents I'm able to see the milonic menu http://www.milonic.com . <div>
12
11116
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. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.