Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing form info through a link
#11
Just as a matter of principle, you should probably filter the input also. In other words, make sure that the value of $_GET['group'] you receive is on an approved list of values or at least falls within the parameters you have established for legitimate values (e.g. is a single letter or number).

In the code example above, I wrote the user's input directly to the HTML code. That's bad practice since it conceivablly opens up the page to "code injection" attacks. One might insert JavaScript in there for example. Or insert SQL that would potentially screw up your data handling down the line.
Reply
#12
>>If thats what i wanted to do, i wouldn't have asked here.

A GET form simply encodes data in the URL. PHP will see this as form data even if it was simply typed into the URL.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)