473,507 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why if(isset($_POST)) is true when its empty...


Folks,

At the begining of my html I have a PHP insert which should be called when
the user submits the form that the html contains... I found when the HTML is
called fresh (ie not processing a form) that

if(isset($_POST))
{
print("<br>true");
}
else
{
print("<br>false");
}

gets me true...

Why?

all help appreciated...
Jul 16 '05 #1
2 30780
Good information, but there is a way to get the list of the 'specif_keys' ?
thx
Joshua Ghiloni <jd***@SPAM.ME.AND.DIE.cwru.edu> wrote in message news:<be**********@eeyore.INS.cwru.edu>...
Randell D. wrote:
Folks,

At the begining of my html I have a PHP insert which should be called when
the user submits the form that the html contains... I found when the HTML is
called fresh (ie not processing a form) that

if(isset($_POST))
{
print("<br>true");
}
else
{
print("<br>false");
}

gets me true...

Why?

all help appreciated...

$_POST is an autoglobal and is always set. Try

if (isset($_POST['specific_key']))

Jul 16 '05 #2
Bela wrote:
Good information, but there is a way to get the list of the 'specif_keys' ?
thx


http://www.php.net/manual/en/function.array-keys.php

RTFM :)

Jul 16 '05 #3

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

Similar topics

2
1636
by: Victor | last post by:
While debugging my stylesheet using XMLSpy, I got a really weird result: <xsl:if test="$match = true()"> matches even if $match is an empty node fragment. How can this be? -- Victor
1
1718
by: Shapper | last post by:
Hello, I have this code line inside an ASP.Net Repeater: <a href='<%# DataBinder.Eval(Container.DataItem, "link") %>'><%= readMore %></a> What I need to do is: 1. Show readMore value if <%#...
0
1482
by: TB | last post by:
Hi All For reasons unknown to me, the Page.IsPostBack is always false when I click a link in a hyperlink column of a datagrid which is created programmatically. My code in a page called...
7
4083
by: darjonase | last post by:
I am having a problem, and I wonder if anyone could help me with it. I have two methods. The first on a form calls the second method which is located in a class lib. 'Form Method Private Sub...
1
2367
by: Pieter | last post by:
Hi, Is there a way to link the Hidden-property of a Textbox on a Reporting Services Report to it's Value? When the Value is empty (""), then I want the TextBox be Hidden. In case you don't...
2
2564
by: yawnmoth | last post by:
<?php $var = 'test'; echo isset($var) ? 'true' : 'false'; echo '<br>'; echo isset($var) ? 'true' : 'false'; ?> Why does that result in this output?:
1
1295
by: fishctr | last post by:
Hi There, I am building a form that allows a business to enter at most 2 mailing addresses. i have the form set up so both inputs are there, storing as a post array. the problem is, when i try to...
5
11414
by: emsik1001 | last post by:
Hi I have a few combo boxes where the match is required. When I select a value and then delete it and go to another control then I get very user unfriendly message "invalid property value". ...
1
9391
by: Santek Moreli | last post by:
I am creating a simple program using a couple methods that will ask the user to input data (type int) until an empty string is entered, after which the output will be displayed. I need to figure...
0
7111
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
7319
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,...
1
7031
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...
1
5042
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...
0
4702
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
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 ...
1
760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
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...

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.