Hide data from HTML Source

Dear PHPs!

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 user.

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?
hagurConnect With a Mentor Commented:
try this

  function getindex($str,$index)
      $lastsep = 0;
      $nextsep = 0;
      $fcount = 0;
      WHILE($fcount < $index)
         $lastsep = $nextsep;
         $nextsep = strpos($str,'|',$lastsep + 1);
       if ($index == 1)
       return substr($str,$lastsep + 1,$nextsep - $lastsep - 1);
  $query = "Name|Age|Height|Weight|";

  echo getindex($query,1) . "|";
  echo getindex($query,3) . "|";
  echo getindex($query,4) . "|";
Where's homepage ?
I don't understand your problem ?
Do you have examples ?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

I'm not sure quite what you mean... are you talking about not showing the infomation in the url e.g. http://www.mywebpage.com/index.html?user=test&password=test2 
If so, then you can hide variables by using forms and the hidden tag...
<INPUT TYPE=hidden NAME="name of my variable" VALUE=<?echo $myvariable?>>
If you mean HTML forms, use the "hidden" input type:

<input type="hidden" name="User_ID" value="<? Print(sUser_ID); ?>">

That way when the program passes the form, the user will not see the input of type hidden, but your program that reads the form will see it.

Substitute whatever you are using to get the User ID for sUser_ID above. You didn't provide any code, so I am guessing. If you provided some code, we could get a better idea on how to answer this.
lmh99Author Commented:

When user send query from web browser to server, they can get result of query.
But, if I want to hide one field from result(even though in page source), how can I do this?

Thanks in advance again.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.