I am creating a messaging system in my website. I have a GET variable that I retrieve from the URL which indicates which user the inputted message should be sent to. I store this variable (messagesTo = $_GET['id']) in a form (with the message body and the logged-in user's id) and once the message is clicked, theoretically the included page should be called and the message should be stored in a DB based on the form's data.
Form page (directMessages.php)
Instead, it says I get an error with the $_GET['id']. I have an error check and the message in the URL says that there is no value for $_GET['id']. No message is being sent to the database.
You're not outputting the hidden values in your form (directMessages.php), ie:
should be
Basically you need to
echo
the value for it to be present in the HTML.