473,466 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying text with include file.

Given this html code page;
======begin
<html>
<body>
<!--#include file="outing.1.shtml"-->
<form action="form.php" method="GET">
<input type="hidden" name="op" value="ds">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<input type="hidden" name="id[1]" value="1">
<td>Name<input name="name[1]" type="text" size="30"></td>
<td>Email<input name="email[1]" type="text" size="60"></td>
<td>Phone<input name="phone[1]" type="text" size="15"></td>
</tr>
</table>
<input type="submit" name="submit" value="submit">
</form>

</body>
</html>
===========end
and this php code page;
==========begin
form.php
<?php
if($_GET["op"] == "ds") {
foreach ($_GET["name"] as $key=>$value) {
echo $_GET["name"][$key] ."-". $_GET["email"][$key] ."-".\
$_GET["phone"][$key] ."-". $_GET["id"][$key];

$fp=fopen("outing.1.shtml","a");
fwrite($fp,$_GET["name"][$key] ."-". $_GET["email"][$key] ."-".\
$_GET["phone"][$key]);
fclose($fp);
}
}
?>
========end

Both of these are on my IP server, EV1.

I would like the contents of 'outing.1.shtml' to be displayed hence
the <!--#include file="outing.1.shtml"--in the HTML code.
Since it does not work, I must ask what is the correct to do this?
TIA
Dave
Sep 10 '06 #1
3 1420
On Sunday 10 September 2006 23:35, Dave Kelly [da********@earthlink.net]
wrote in message <4r****************@newsread1.news.pas.earthlink.n et>
Given this html code page;
======begin
<html>
<body>
<!--#include file="outing.1.shtml"-->
I would like the contents of 'outing.1.shtml' to be displayed hence
the <!--#include file="outing.1.shtml"--in the HTML code.
Since it does not work, I must ask what is the correct to do this?
<?php include("outing.1.shtml")?>

You were using the ASP #include.
Sep 10 '06 #2
PDannyD wrote:
On Sunday 10 September 2006 23:35, Dave Kelly [da********@earthlink.net]
wrote in message <4r****************@newsread1.news.pas.earthlink.n et>
>>Given this html code page;
======begin
<html>
<body>
<!--#include file="outing.1.shtml"-->

>>I would like the contents of 'outing.1.shtml' to be displayed hence
the <!--#include file="outing.1.shtml"--in the HTML code.
Since it does not work, I must ask what is the correct to do this?


<?php include("outing.1.shtml")?>

You were using the ASP #include.
Actually, this is not the ASP include. It is the SSI include, and is
perfectly valid.

But Apache needs to be told to parse these pages for SSI includes (and
similar statements).

Check alt.apache.configuration and/or alt.html. This has nothing to do
with php.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 11 '06 #3

PDannyD wrote:
On Sunday 10 September 2006 23:35, Dave Kelly [da********@earthlink.net]
wrote in message <4r****************@newsread1.news.pas.earthlink.n et>
Given this html code page;
======begin
<html>
<body>
<!--#include file="outing.1.shtml"-->
I would like the contents of 'outing.1.shtml' to be displayed hence
the <!--#include file="outing.1.shtml"--in the HTML code.
Since it does not work, I must ask what is the correct to do this?

<?php include("outing.1.shtml")?>

You were using the ASP #include.
No that is a server side include, well possibly your server doesnt
support ssi?? and why not just use php anyway since you have that code
int he document already, rename the file as .php and use as suggested
include("page.php");

Flamer.

Sep 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
2
by: Joe Price | last post by:
Hi chaps I've got an XML file, within that file i've embedded html code using the <!]> tag I'm displaying that xml file through a browser using an xsl style sheet. However it is displaying...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
0
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way...
1
by: royzeb | last post by:
Hi, I've got a simple vc++ program that basically just runs a daemon in the background and sends update messages to a logfile as it goes along. What I'd like to do is see these log messages also...
5
by: monomaniac21 | last post by:
Hi I have uploaded a pdf file into my db and am trying to display it again here is the code i have used (at the moment it is just displaying the binary file's code as text in a html page: <?php...
2
by: coolindienc | last post by:
Hello, I am tying to display two dimensional array from a txt file. I am not sure if I am not calling it right or displaying it right? My text file and source code are as below. Text file ...
1
by: bimeldip | last post by:
Hi, I've been dabbling with mysql php and xml... I have managed to learn how to upload xml file into mysql datbase and download the file from mysql database to display the content on the file....
38
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.