I have perl script that uses POST to send data to a PHP script. Some of these variables are then inserted into an SQL statement, which gets executed in the PHP script.
The perl script submits two variables:
id (pre-populated by the perl script)
text (entered by the user)
For example, if I send id=123 and text=Hello, the PHP script will read it as:
$POST['id'] = 123
$POST['text'] = Hello
However, if the user enters "hello&id=456" in the text field, $_POST['id'] will be set to "456" instead of "123".
I can URL encode this field in Perl, then decode it somewhere in the PHP code, but is there a better workaround to this problem?