POST extra values in an HTML <form>

You can simply use a hidden field. Like so:

<input type="hidden" name="your-field-name" value="your-field-value" />

This field will then be available in your PHP script as $_POST['your-field-name']


As mentioned already, using hidden input fields is an option, but you can also use a session. That way you don´t have to post anything, the variables remain on the server and are not exposed in the html.


You can include a hidden form element.

<input type="hidden" name="foo" value="bar" />