Invisible Form Fields

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

Post Reply
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Invisible Form Fields

Post by Jim »

I've heard a bit about them and I find I CAN'T find anything about them on the net.

I may be looking in the wrong places, but I'm sure someone here can help.

How do I create invisible fields?

Gracias!
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

Post by gotDNS »

hey Jim, hidden fields are simple, here:

Code: Select all

<input type="hidden">
Don't forget all the other stuff like value , but just make the type="hidden"
Jim
Forum Contributor
Posts: 238
Joined: Fri Apr 19, 2002 5:26 am
Location: Near Austin, Texas

Post by Jim »

Thanks man.

I'm so sad it was that obvious. How very, very disappointing ;)
lc
Forum Contributor
Posts: 188
Joined: Tue Apr 23, 2002 6:45 pm
Location: Netherlands

Post by lc »

hey that's cool.. I didn't even know those existed! lol very helpfull!
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

you can use them for vaildatiog scripts and forms etc, e.g.

<form method=post action="<?php print("$php_self"); ?>">
your name:<input type="text" name="name"><br>
<input type="hidden" name="name_enterd">
<input type="Submit">

<?php
if(IsSet($name_enterd))
{
Print("Your Name is $name");
}
else
{
Print("You Need to enter your name first!");
}
?>
Post Reply