Hide data from HTML source

Dear CGIs!

This is novice in CGI programming.
On my home pages, user can search members that match
with his queries.

There is no problem, except I don't want to show "User ID" to

How can I do this?
How can I hide "User ID" in HTML source?
Is it possible?

And one more,
Can I hide a record field from query result?
(Ex. Name | Age | Height | Weight | ...
I want to hide age field from query result. But it is necessary to execute other program. So, I have to query it)

Thanks in adavance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can put this line somewhere inside the <FORM> on the page:

<INPUT type=hidden name="finik" value="Imh99">

This way the user won't see it in the browser location bar and not on the page itself,
but whenever he submits the form, your script will get this parameter in the query. I use it whenever I need to hold
some session variable (like ID :)
during user's navigation through my CGI.

I think that was exactly what you were looking for. Good luck.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lmh99Author Commented:
But, I can read User ID in HTML source.

I want to hide user ID in HTML source.

Thanks in advance again.
Well, it has to be somewhere.
Or maybe I don't understand your question in a first place :)
Anyway, in order to for a CGI to get a parameter, it has to be in the form either as a button/checkbox/pulldown/whatever (visible for a user), or hidden (as I showed earlier). There is no way of hiding parameter from html, but to make it available to the processing cgi.
There is, however, an option of keeping it in the cookies, if you are interested,
I can show you how I recently did it
in one of my projects.
lmh99Author Commented:
I'm interested in your project.
Well, here it goes:

use CGI; # :)

When you CGI (on of your CGI's) get's the UID from the user
it first takes it, of course:

$login = $query->param('login');

Then, whenever you want to write a cookie to a user
you make smth like:

$cookie = $query->cookie(-name=>'rrs_login',
# Where rrs_login is the name of the cookie, and +10m is 10 minutes
to remember it. Since the cookie sent to a browser in the header,
you will need to do all this before sending the header to the user.
Now, you can send it to user:

print $query->header(-cookie=>$cookie,
                         -Pragma=>'no cache');

That way, the rrs_login cookie is saved in the user's browser, and other CGI
can access it through:

$login_from_cookie = $query->cookie('rrs_login');

Anyway, that was short, you can read all about it in the CGI.pm documentation (the one I learned it from :):

good luck, but remember, users can always switch cookies off in their
browsers or use some weird non-netscape-non-ie-neverheardofcookies browser(tm), so take it into consideration.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.