473,883 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problems with POST

Hi,

The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?

On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden values
(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22" width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find the
following :

QUERY_METHOD POST
REQUEST_METHOD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?

many thanks

mori

Nov 27 '05 #1
24 2904
>The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?
A variable passed from HTML by the POST method is $_POST['r'] or
$_POST['p'], *not* $r or $p. (Also see $_GET for variables
passed by the GET method). Fix your script. Do not turn
on "register_globa ls".

Gordon L. Burditt


On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden values
(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22" width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find the
following :

QUERY_METHOD POST
REQUEST_METH OD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?

many thanks

mori

Nov 27 '05 #2
wow, thx for the *very* quick reply ;-)

tried changing the
echo "\$p = $p<br><br>";

to

echo "\$p = " . $_POST['p'] . "<br><br>";

but still not working :(

mori

"Gordon Burditt" <go***********@ burditt.org> wrote in message
news:11******** *****@corp.supe rnews.com...
The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?


A variable passed from HTML by the POST method is $_POST['r'] or
$_POST['p'], *not* $r or $p. (Also see $_GET for variables
passed by the GET method). Fix your script. Do not turn
on "register_globa ls".

Gordon L. Burditt


On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden values(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22" width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find thefollowing :

QUERY_METHOD POST
REQUEST_METH OD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?

many thanks

mori


Nov 27 '05 #3
Don't know much about PHP, but it does appear you are sending "<body>"
twice, once in line 2 and once in line 7. The one in line 2 should be
deleted so the "<head>" section of the page comes first. Or you need to
rearrange the order of your statements.

Nov 27 '05 #4

"PeteY48" <pe********@gma il.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Don't know much about PHP, but it does appear you are sending "<body>"
twice, once in line 2 and once in line 7. The one in line 2 should be
deleted so the "<head>" section of the page comes first. Or you need to
rearrange the order of your statements.


Yes, you are right about the double <head>, this was due to shortening the
script and missing this repeat.
However, this makes absolutely no difference to the operation of the script.
Nov 28 '05 #5
moriman wrote:
wow, thx for the *very* quick reply ;-)

tried changing the
echo "\$p = $p<br><br>";

to

echo "\$p = " . $_POST['p'] . "<br><br>";

but still not working :(

mori

"Gordon Burditt" <go***********@ burditt.org> wrote in message
news:11******** *****@corp.supe rnews.com...
The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?


A variable passed from HTML by the POST method is $_POST['r'] or
$_POST['p'], *not* $r or $p. (Also see $_GET for variables
passed by the GET method). Fix your script. Do not turn
on "register_globa ls".

Gordon L. Burditt
On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden
values
(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22 " width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find
the
following :

QUERY_METH OD POST
REQUEST_METH OD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?

many thanks

mori




Try:

echo "\$p = " . $HTTP_POST_VARS['p'] . "<br><br>";
Nov 28 '05 #6

"Juliette" <jr*********@jo keaday.net> wrote in message
news:43******** *************** @news.wanadoo.n l...
moriman wrote:
wow, thx for the *very* quick reply ;-)

tried changing the
echo "\$p = $p<br><br>";

to

echo "\$p = " . $_POST['p'] . "<br><br>";

but still not working :(

mori

"Gordon Burditt" <go***********@ burditt.org> wrote in message
news:11******** *****@corp.supe rnews.com...
The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?

A variable passed from HTML by the POST method is $_POST['r'] or
$_POST['p'], *not* $r or $p. (Also see $_GET for variables
passed by the GET method). Fix your script. Do not turn
on "register_globa ls".

Gordon L. Burditt

On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden


values
(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22 " width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find


the
following :

QUERY_METH OD POST
REQUEST_METH OD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?
many thanks

mori




Try:

echo "\$p = " . $HTTP_POST_VARS['p'] . "<br><br>";


nope, doesn't work either :(
Nov 28 '05 #7


moriman wrote:
"Juliette" <jr*********@jo keaday.net> wrote in message
news:43******** *************** @news.wanadoo.n l...
moriman wrote:
wow, thx for the *very* quick reply ;-)

tried changing the
echo "\$p = $p<br><br>";

to

echo "\$p = " . $_POST['p'] . "<br><br>";

but still not working :(

mori

"Gordon Burditt" <go***********@ burditt.org> wrote in message
news:11******** *****@corp.supe rnews.com...

> The script below *used* to work. I have only just set up a
> server, PHP etc again on my Win98 system and now it doesn't?
A variable passed from HTML by the POST method is $_POST['r'] or
$_POST['p'], *not* $r or $p. (Also see $_GET for variables
passed by the GET method). Fix your script. Do not turn
on "register_globa ls".

Gordon L. Burditt

> On first loading this page, you would have
>
> $p =
>
> and the button image below it.
> On clicking the button the same page would reload but pass the hidden
values

> (r=w & p=f)
> so that the first line of the page would then have
>
> $p = f
>
> This no longer works???
>
> <?php
> echo "<html><bod y>";
> echo "\$p = $p<br><br>"; //###
> $str = <<<HTM
> <head>
> </head>
> <body>
> <form action="" method="post">
> <input type="hidden" name="r" value="w">
> <input type="hidden" name="p" value="f">
> <input type="image" src="http://home/images/faq-up.gif" border="0"
> height="22" width="77">
> </form>
> </body>
> </html>
> HTM;
> echo $str;
> ?>
>
>
> on printing the $_ENV variables along with the the above script I find
the

> following :
>
> QUERY_METHOD POST
> REQUEST_METHOD POST
> FORM_P f
> FORM_R w
>
> Is there something I haven't enabled in my
> setup of PHP that is stopping this from working now?
>
> Or has something changed with PHP, so that I have to do this another way?> many thanks
>
> mori
>
>
>

Try:

echo "\$p = " . $HTTP_POST_VARS['p'] . "<br><br>";


nope, doesn't work either :(


This will work, you have to set up an submit button
(javascript or nativ html to send your form data)

If you would like to have an image you should prefer JavaScript.
If a simple HTML - Button is enougth try the simple Submit Button like
in my example.
Have Fun...

<?php
echo "<html>";
echo "\$p = ".$_POST['p']."<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="submit">
</form>
</body>
</html>
HTM;
echo $str;
?>
Nov 28 '05 #8
moriman wrote:
Hi,

The script below *used* to work. I have only just set up a
server, PHP etc again on my Win98 system and now it doesn't?

On first loading this page, you would have

$p =

and the button image below it.
On clicking the button the same page would reload but pass the hidden values
(r=w & p=f)
so that the first line of the page would then have

$p = f

This no longer works???

<?php
echo "<html><bod y>";
echo "\$p = $p<br><br>"; //###
$str = <<<HTM
<head>
</head>
<body>
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22" width="77">
</form>
</body>
</html>
HTM;
echo $str;
?>
on printing the $_ENV variables along with the the above script I find the
following :

QUERY_METHOD POST
REQUEST_METHOD POST
FORM_P f
FORM_R w

Is there something I haven't enabled in my
setup of PHP that is stopping this from working now?

Or has something changed with PHP, so that I have to do this another way?

many thanks

mori

How are you submitting your form? I don't see a submit button, for
instance.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Nov 28 '05 #9
vdP
Jerry Stuckle wrote:
moriman wrote:
<form action="" method="post">
<input type="hidden" name="r" value="w">
<input type="hidden" name="p" value="f">
<input type="image" src="http://home/images/faq-up.gif" border="0"
height="22" width="77">
</form>

How are you submitting your form? I don't see a submit button, for
instance.

I thought the same till I looked up the HTML-specification at
http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.4
Apparently the input of image type serves as a submit button.

vdP
Nov 28 '05 #10

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

Similar topics

2
17423
by: jfixsen | last post by:
Hello! Oracle 9.2.0.4 SunOS pchi-db01 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-EnterpriseSystem = SunOS Node = pchi-db01 Release = 5.8 KernelID = Generic_108528-19 Machine = sun4u BusType = <unknown>
5
4617
by: Tyler Style | last post by:
Hullo - looking for a little advice here. I have a form on a page in one domain submitting to a cgi in another domain. Weirdly, on some Windows XP systems, a form on the page fails to submit/post properly to the cgi and users get the message from IE that it "Cannot find server: The page cannot be displayed The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to...
1
2216
by: Henry Reardon | last post by:
I'm having some migration problems. On Friday, I upgraded from DB2 7.2 (FP9) to DB2 8.2 (FP7), then applied Fixpack 8. I'm running Windows XP. My migrations did not work and I am trying to fix them manually. The Control Center gives me SQL0535 for some of the databases and SQL1039C for the others. I'll describe the SQL0535 problems in this note and make a separate post for SQL1039C.
10
2424
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
19
2995
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and provide an open TD with a DIV in it for the content of this formlet. (The DIV is for DHTML to hide and show the content) I've created a web page showing step by step the two problems I'm encountering. This problem is much easier to see than it...
17
2516
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control 'Button19' of type 'Button' must be placed inside a form tag with runat=server Can the IDE not do what it is supposed to do. It seems that it is a fight to make it do anything or did I do something wrong? It would seem silly to have to create a...
10
19184
by: Danny | last post by:
Hi all, I am having some odd problems with AJAX on Firefox (1.5). When I use GET as the request method everything works ok, but when I do a POST the remote function doesn't get the parameters I am passing to it. Everything works fine on IE 6. Here's a couple samples of what I am doing: // using GET url = 'http://www.myserver.com/cgi-bin/funct?key1=value1&key2=value2'
71
19166
by: desktop | last post by:
I have read in Bjarne Stroustrup that using malloc and free should be avoided in C++ because they deal with uninitialized memory and one should instead use new and delete. But why is that a problem? I cannot see why using malloc instead of new does not give the same result.
3
1392
Mobius Evalon
by: Mobius Evalon | last post by:
I've been staring at this problem and stabbing in the dark at it for a few hours now, and I've finally broken down to the point where I realize I need some help. I'm absolutely positioning most of the elements on my site, found here: http://mobiusevalon.tibbius.com/tibbius/ I'm having problems with the post information displayed at the top left of each post div. The first set appear where they're supposed to, but each consequent post...
34
5388
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> os.startfile("C:\Documents and Settings\Alex\My Documents\My
0
9936
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
9791
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
10742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10412
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...
0
9571
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7970
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
7123
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();...
1
4610
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
4215
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.