Check if form is submitted

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

8O


Hmmm - I found the problem.

Code: Select all

<input type="submit" name="Submit" value="Submit">
When I changed the above to the below it worked.

Code: Select all

<input type="submit" name="submit" value="Submit">
All I did was change the capital S on Submit to lower case.

Any hoots. It works now.

I'm off to figure out some more stuff about classes now.

Cheers
Jim
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

hairyjim - depending on your page, you can tell if they submitted the form by simply counting the values in $_POST:

Code: Select all

if (count($_POST) > 0)
{
echo "they submitted something, somehow";
}
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

Post by hairyjim »

Thanks.

No doubt there will be further threads from me regarding forms and validation.

Jim
Post Reply