473,789 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with $_POST variable

Hi,

I'm learning PHP and prepared a simple login form. validate.php does
the validation and it was behaving erratically. So, I did var_dump of
$_POST variable and it's NULL. Did I miss anything here regarding the
configuration or code? Code for validate.php is given below.

<?php
var_dump($_POST );

$user=$_POST['login'];
$password=$_POS T['password'];

// .... Rest of the validation ...
?>
Any kind of help would be highly beneficial.

Jul 17 '05
10 14697
Ramius wrote:
"print_r"
would produce incomplete results ( because $_POST might contain nested
arrays ). var_dump will echo all the contents of $_POST which is
useful for testing purposes.


print_r() prints nested arrays.

JP

--
Sorry, <de*****@cauce. org> is a spam trap.
Real e-mail address unavailable. 5000+ spams per month.
Jul 17 '05 #11

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

Similar topics

3
4633
by: Bryan Wood | last post by:
I am developing a regisration page that will present a set of check boxes to the viewer. This list of checkboxes is developed from a list in a database so the amount and names of the boxes will change. This portion works just fine. The page content has a user name and password along with several sets of these checkboxes. All the form content of this page is presented in one form. The problem:
3
2677
by: Thomas Hoheneder | last post by:
Hello, I use PHP 4.3.10 and want to deliver a post variable from a PHP page to itself. In my page mypage.php I have a hidden field named "dbaction" and a form button. When clicking the form button a javascript function is called where the dbaction hidden field is set to the value "change" (=actn) and then the form gets submitted. function doAction(actn) { document.forms.dbaction.value = actn;
3
4373
by: JÿGius³ vs ::NRG::ius | last post by:
Hi all. I have a script with a form <form action="a.php" ... method="post"> <input name="field" ...> </form> a.php gets the variable with
4
2312
by: Lee David | last post by:
I have a validation form that lets you enter your ID and password. Then I call the page again. This time the page script should check that it is a "recall" and check the entered data with the database. With a match, set three cookies (this doesn't work) and redirect to another page. With a miss, see the cookies to "guest" values and redirect to a different page. When I "echo" from within the code (for testing), it displays showing the...
1
2435
by: unknown; | last post by:
hello i'm using a php script opening en parsing a url like www.OpenThisURL.com/site.php?a=aa&b=bb this url and website are not mine but i'm only using some information from the site. now this site has changed and the GET variable a=aa & b=bb have
4
1191
by: jamietsh | last post by:
Because i've already used perl to write my program, i now need to have a button to extract the variable and post them to a notepad to make it like a report. Is there any way to do this? Thanks.
5
1580
by: pavloutefkros | last post by:
sorry for creating a new post but this is totally different from the previous one. Here is the problem (which is very hard to explain, so i will use a paradigm): i submit a form and the post variable is being sent to the page test.py. then the test.py retrieves the POST and print it to the page. now everything is great except one thing. lets say i submitted the form and went to test.py and the output was correct, then, while i'm on...
0
961
by: Terry Reedy | last post by:
dudeja.rajat@gmail.com wrote: As Tim noted, this cannot run. *** Always post the code you actually ran *** So we cannot answer why the code you did not post did not work. With the mod/mod1 mixup fixed, you do not need the update function. mod.a = 20 should do the same thing.
5
3517
by: mfaisalwarraich | last post by:
hi everybody, please tell me how i can get red of escaping problem. im not very much familiar with PHP so i hope anybody can help me here I am trying to get the values in a form if back button of browser is used. here is the code that im using: echo('
0
9666
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
9511
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
10410
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
7529
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
6769
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
5418
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
4093
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
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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.