I have a form that takes user message and send it to the recipient. On the PHP side, I have three variables: $senderid, $recipientid and $messageid. So far I have been using hidden input on the firm, for example
<input type="hidden" id="senderid" value="<?php echo $senderid; ?>" />
<input type="hidden" id="recipientid" value="<?php echo $recipientid; ?>" />
<input type="hidden" id="messageid" value="<?php echo $messageid; ?>" />
<textarea id="message" name="message" rows="5" cols="10"></textarea>
I am using VAR SENDERID = $('#senderid').val(); and so on for rest to pass it to an Ajax script. This works fine. The thing I don't like is that the hidden input, even though it is hidden, can be changed. Someone could change the value of $senderid, $recipientid and $messageid through Firebug. If someone did so, it would totally screw my message system. Is there any other way to pass the variables to Ajax without using hidden input?