3

Started collaborating on a friend's project.
Just pulled a crazy stupid hack just to get it to work as intended.

<input type="text" name="page" value="somepage" style="display:none">

My friend and I are still loling at this.

Comments
  • 5
    type=hidden
  • 3
    @Qchmqs *facepalm* duh. Thanks!

    Wait. You mean hidden form elements to ensure certain vars are sent to PHP is a valid use of an input element and not a hack? 😮

    Edit: I just realized how stupid this comment is. Don't mind me, just absent minded and dumb today.
  • 1
  • 0
    @corscheid I know we aren't on SO, but what is the proper way of doing smt like this?
    I just recently started using PHP and had no idea what else to do.😔
  • 0
    @vringar I'm in the same boat as you. I'm not a professional web developer. I only code as a hobby for now until I learn more and get into the field
  • 1
    Just use type hidden, will not be visible and when you submit the form the back end will receive just like the others inputs
  • 0
    @sgoten I've just implemented exactly that. Somehow I overlooked the existence of hidden type input elements.
Add Comment