Jump to content

Input box


mwl707

Recommended Posts

Hi I want to display a form pre-filled with some data. I am using javascript to do this. But after pre-filling the form i want to 'protect' one of the input boxes so the data cannot be changed. is there any way I can do this ?. I know I could remove the input box in question and just add the data in a div area etc.. but i would like to keep the continuity of the form . Any help or suggestions would be much appreciated

 

thanks 

Link to comment
https://forums.phpfreaks.com/topic/177082-input-box/
Share on other sites

You could, but it would never be secure.

 

ANYTHING that you do in a HTML form can be changed. Just because you show the user 2 input boxes rather than 3 doesn't mean a hacker can't send the 3 bits of data. It is all down to the PHP server-side.

 

The same if you offer them a dropdown to choose 1,2 or 3 - it must be set in the receiving server-side script to only allow 1,2,3 etc.

 

If you want to do it then this will show you the difference:

<input style="visibility:hidden" type="text" value="hello"/>

<input type="text" value="hi there"/>

Link to comment
https://forums.phpfreaks.com/topic/177082-input-box/#findComment-933824
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.