如何设置php脚本以返回浏览器页面? [英] How do I setup php script to return a browser page?

查看:64
本文介绍了如何设置php脚本以返回浏览器页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望服务器端php脚本返回一个浏览器页面,该页面本质上是包含< form>的

原始客户端页面的副本。它首先引用了php脚本。

但是,php脚本需要在返回的页面中更改几行html行。我肯定可以给你一些关于如何解决这个问题的帮助。


提前致谢,

Don

---- ==通过Newsfeeds.Com发布 - 无限制 - 未经审查 - 安全Usenet新闻== ----
http://www.newsfeeds.com 世界排名第一的新闻组服务! > 100,000新闻组

--- =东/西海岸服务器农场 - 通过加密的总隐私= ---

解决方案

2004年10月11日星期一10:07:20 -0700,Don< no@adr.com>写道:

我希望服务器端的PHP脚本返回一个浏览器页面,该页面本质上是包含< form>的原始客户页面的副本。首先引用了php脚本。
但是,php脚本需要在返回的页面中更改几行html行。我肯定能帮你解决这个问题。

提前致谢,
$

---- ==发表于Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet新闻== ----
http:/ /www.newsfeeds.com 世界排名第一的新闻组服务! > 100,000新闻组
--- =东/西海岸服务器农场 - 通过加密的总隐私= ---




猜猜我真正需要什么知道我应该如何构建表格''< input>标记,使用隐藏的

字段,将客户端页面作为数组传递。而且,服务器端php脚本应如何检索并将
打印到返回的浏览器页面?我仍然是html和php编程的新手。当然

会对此有所帮助。


提前致谢,

Don

---- ==通过Newsfeeds.Com发布 - 无限制 - 未经审查 - 安全使用网新闻== ----
http://www.newsfeeds.com 世界排名第一的新闻组服务! > 100,000新闻组

--- =东/西海岸服务器场 - 通过加密的总隐私= ---




Don < no@adr.com>在消息中写道

新闻:8g ******************************** @ 4ax.com ...

2004年10月11日星期一10:07:20 -0700,Don< no@adr.com>写道:

我希望服务器端的PHP脚本返回一个浏览器页面,该页面基本上是包含<的原始客户端页面的副本。形式>首先引用了php
脚本。
然而,php脚本需要在那个
返回的页面中更改一些html行。我肯定能帮你解决这个问题。

提前致谢,
$

---- ==发表于Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
新闻== ----
http://www.newsfeeds.com 世界排名第一的新闻组服务! > 100,000
新闻组
--- =东/西海岸服务器农场 - 通过加密的总隐私= ---



猜猜我真正需要什么知道我应该如何构建表格''
< input>标记,使用隐藏的
字段,将客户端页面作为数组传递。而且,
服务器端的PHP脚本应如何检索并将其打印到返回的浏览器页面?我仍然是html和
php编程的新手。当然
会对此有所帮助。

提前致谢,>




你好,

我不确定我是否理解你,但这是一个快速的样本表格。

将表格保存到名为''TestForm.php'的文件中或者它将无法正常工作

(除非您还修改了帖子操作字段)。表单只显示2

字段以输入forname和surname。一个名为''action''的隐藏字段是

用于告诉表单重新显示帖子数据。


所以基本上,提交表单时, post数据用于文本框的

值字段。这种技术应该能够轻松地根据您的需求进行调整。请注意,''addslashes''将保护您的数据库免受

滥用,假设数据将在某个时刻进入数据库。这只是

a快速而肮脏的样本,但应该让你大致了解该怎么做。


马丁


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.0 Transitional // EN">

< HTML>< HEAD>< TITLE>测试表格< / TITLE>

< / HEAD>

< BODY>


< form method =" post"行动= QUOT; TestForm.php" NAME =" form1的" >

< table WIDTH =" 100%" BORDER = 0 CELLPADDING = 0 CELLSPACING = 0>


<?php


函数AddTextField(


< BLOCKQUOTE>描述

I want the server-side php script to return a browser page that is essentially a copy of the
original client page that contained the <form> which referenced the php script in the first place.
However, the php script will need to change a couple html lines in that returned page. I sure could
you some help on how to go about this.

Thanks in advance,
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---

解决方案

On Mon, 11 Oct 2004 10:07:20 -0700, Don <no@adr.com> wrote:

I want the server-side php script to return a browser page that is essentially a copy of the
original client page that contained the <form> which referenced the php script in the first place.
However, the php script will need to change a couple html lines in that returned page. I sure could
you some help on how to go about this.

Thanks in advance,
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



Guess what I really need to know is how should I construct the form''s <input> tag, using a hidden
field, to pass the client page as an array. And, how should the server-side php script retrieve and
print it to the returned browser page? I''m still pretty new at html and php programming. Sure
would appreciate a little help with this.

Thanks in advance,
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



"Don" <no@adr.com> wrote in message
news:8g********************************@4ax.com...

On Mon, 11 Oct 2004 10:07:20 -0700, Don <no@adr.com> wrote:

I want the server-side php script to return a browser page that is
essentially a copy of the
original client page that contained the <form> which referenced the php
script in the first place.
However, the php script will need to change a couple html lines in that
returned page. I sure could
you some help on how to go about this.

Thanks in advance,
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



Guess what I really need to know is how should I construct the form''s
<input> tag, using a hidden
field, to pass the client page as an array. And, how should the
server-side php script retrieve and
print it to the returned browser page? I''m still pretty new at html and
php programming. Sure
would appreciate a little help with this.

Thanks in advance,
Don



Hi Don,
I''m not sure I have understood you, but here is a quick sample form.
Save the form to a file called ''TestForm.php'' or it will not work correctly
(unless you also modify the post action field). The form just displays 2
fields to enter a forname and surname. A hidden field called ''action'' is
used to tell the form to redisplay the post data.

So basically, when the form is submitted, the post data is used for the
value fields of the text boxes. This technique should be able to be easily
adapted to your needs. Note the ''addslashes'' will protect your database from
abuse assuming the data will go into a database at some point. This is just
a quick and dirty sample, but should give you a general idea of what to do.

Martin

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Test Form</TITLE>
</HEAD>
<BODY>

<form method="post" action="TestForm.php" NAME="form1" >
<table WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>

<?php

function AddTextField(


Description,


这篇关于如何设置php脚本以返回浏览器页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆