473,666 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does my PHP not recognize $_POST but $_REQUEST still works

3 New Member
I am an old school (mainframe) programmer trying to learn the new web technology. I was having a terrible time trying to get PHP to process a parameter passed from a form. It is apparently supposed to be automatic, but it didn't work for me.
When I changed the method to GET instead of POST on my INPUT HTML it started sending the data in the URL. I changed the method back to POST but the parameters are still being transmitted using an extended URL. When I finally figured out how to get the information to PHP from the $_POST array (THANKS TO THIS WEBSITE!) I had to change to $_REQUEST for it to work. I really don't want to generate a new URL every time the form gets used.
Jan 7 '12 #1
2 10414
Dormilich
8,658 Recognized Expert Moderator Expert
I changed the method back to POST but the parameters are still being transmitted using an extended URL.
are you sure you are using the POST method? if you have the data in the URL, it is definitely GET. and if it’s GET then $_POST won’t be populated.

the HTML should look somewhat like <form action="process .php" method="post">
Jan 7 '12 #2
Freedom Coach
3 New Member
It appears that I did not SAVE the change back to method="post". Sorry about the false alarm.
Jan 8 '12 #3

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

Similar topics

4
10554
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a great article about the issue: http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html Generally, that states that this are is filled with landmines. From my tests
3
59648
by: reneeccwest | last post by:
How can I simulate HTTP post request by JavaScript? When I select from <SELECT> combo box. onClick will call JavaScript function. I want this function to send HTTP POST request with the selected index of the combo box. To do this, somehow the function must simulate HTTP POST request. Thanks in advance.
2
3120
by: Robert Oschler | last post by:
I am working on a PHP 4 app that interacts with an external authorization server. The external server does "third-party" authorization of users. So I do the following: 1) Each of my PHP scripts has an include file (require_once) that checks to see if the current user has recently been authorized. 2) If not, the user is "handed off" to the external server. I do this by building the necessary URL for authorization and using refresh to...
4
3151
by: James Johnson | last post by:
Dear C#Dex, I am trying to automate a POST to a web page that clicks a button. I have been able to hit a target web page and run the web page. However, the button on the page does not click. I can set the target web page to change to a new URL when I hit it, and that works, but I cannot get the button to click based on my POST command. Is there some secret to clicking the button? I have a button named btnGo and I set the value of...
7
9295
by: Carl | last post by:
these are three files below : submit.html <html> <head> </head> <body> <form action="redirect.php" method="POST" > <input type="text" name="value" value="test" > <input type="submit" > </form>
2
6344
by: Samuel Shulman | last post by:
I have to create a page that all it does it handle a 'POST' request with some parameters So I created a blank page and in the Load event I try to handle the parameters passed but the page doesn't open it and returns some error Any suggestions? Samuel
4
2230
by: figelwump | last post by:
All, I am writing an HTTP 1.1 compliant proxy in c#.NET, for use as a proxy server for any web browser (IE, firefox, etc). I've got it working fine for GET requests. However, when a POST request is issued by IE, I find that sometimes IE does not render the page, even though my proxy reports that it successfully sent the response from the server back to IE. So, in IE a blank page is rendered. If I use a plugin like IEWatch, it seems...
2
6300
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata enctype="multipart/form-data" method="post" name="testform">
3
5033
by: Jag | last post by:
Hi I am facing a strange issue. I have 3 ASP pages in the default website 1. auth.aspx <html> <body>
6
8283
by: 703designs | last post by:
I'm writing a little Drupal module that implements a couple forms, relaying the submitted values to a third-party site. I know the target URL and I have all of the values that I want to submit with the POST request, so how can I invoke this request directly from a PHP script?
0
8438
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
8348
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
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
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
4186
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2765
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
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1761
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.