I want to insert values into hidden fields so I can post them to PHP. How would I do this? And... Is this the best way because some people say hidden fields are easy to hack.
Try this: <input type="hidden" name="hidden_field" value="whatever" /> Code (markup): Keep in mind that the field is just not visible for the common user. This doesn't mean that it cannot be modified.
Anyone can just open their text editor and change the values to whatever they want. Pretty much anything sitting on the front-end (HTML, CSS, JS, etc) can be manipulated as it's easily accessed. So your PHP will have to double-check those values to make sure they are correct and make sense.