By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,509 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,509 IT Pros & Developers. It's quick & easy.

Hide key value in drop-down

P: n/a
Hello,

Access has the ability to hide the key value in a drop-down menu. Is there a
way in PHP to do the same thing?

Thanks,

Vic

Dec 24 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Vic Spainhower wrote:
Hello,

Access has the ability to hide the key value in a drop-down menu. Is there a
way in PHP to do the same thing?

Thanks,

Vic


PHP doesn't do drop down menus. HTML does.

And no, there is no way for HTML to hide the key value. The client
needs that value to return to the server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Dec 24 '05 #2

P: n/a
That was the short answer. What do you mean by hiding exactly? If you
just want to hide the key values from the renered page, just use the
value attribute:
<option value="3">Number Three</option>
instead of
<option>3</option>

I can imagine that you want to hide your actual database IDs. In that
case, just don't send them. Compute a hash from them (or better: a
"salted" hash by including the session id) and send the hashes instead.
Store these hash values in the $_SESSION array, so you can look up the
real database IDs from the submitted hash value.

Have a nice christmas.

Jerry Stuckle wrote:
Vic Spainhower wrote:
Hello,

Access has the ability to hide the key value in a drop-down menu. Is
there a way in PHP to do the same thing?

Thanks,

Vic


PHP doesn't do drop down menus. HTML does.

And no, there is no way for HTML to hide the key value. The client
needs that value to return to the server.

Dec 24 '05 #3

P: n/a
Thanks Dikkie that helps and a Merry Christmas to you!

Vic

"Dikkie Dik" <no****@nospam.org> wrote in message
news:do**********@news.cistron.nl...
That was the short answer. What do you mean by hiding exactly? If you just
want to hide the key values from the renered page, just use the value
attribute:
<option value="3">Number Three</option>
instead of
<option>3</option>

I can imagine that you want to hide your actual database IDs. In that
case, just don't send them. Compute a hash from them (or better: a
"salted" hash by including the session id) and send the hashes instead.
Store these hash values in the $_SESSION array, so you can look up the
real database IDs from the submitted hash value.

Have a nice christmas.

Jerry Stuckle wrote:
Vic Spainhower wrote:
Hello,

Access has the ability to hide the key value in a drop-down menu. Is
there a way in PHP to do the same thing?

Thanks,

Vic


PHP doesn't do drop down menus. HTML does.

And no, there is no way for HTML to hide the key value. The client needs
that value to return to the server.

Dec 24 '05 #4

P: n/a
Thanks Dikkie that did the trick! Merry Christmas to you.

Vic

"Dikkie Dik" <no****@nospam.org> wrote in message
news:do**********@news.cistron.nl...
That was the short answer. What do you mean by hiding exactly? If you just
want to hide the key values from the renered page, just use the value
attribute:
<option value="3">Number Three</option>
instead of
<option>3</option>

I can imagine that you want to hide your actual database IDs. In that
case, just don't send them. Compute a hash from them (or better: a
"salted" hash by including the session id) and send the hashes instead.
Store these hash values in the $_SESSION array, so you can look up the
real database IDs from the submitted hash value.

Have a nice christmas.

Jerry Stuckle wrote:
Vic Spainhower wrote:
Hello,

Access has the ability to hide the key value in a drop-down menu. Is
there a way in PHP to do the same thing?

Thanks,

Vic


PHP doesn't do drop down menus. HTML does.

And no, there is no way for HTML to hide the key value. The client needs
that value to return to the server.

Dec 24 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.