Hi everyone, can you help me understand the logic why I can't access one of my the items in POST.
Here is my form:

<form action="insert2.php" method="POST">

<table border="0">               
                    <td width="40%"><b>Date:</b></td>
                    <td width="60%"> <input type='text' name="today" placeholder='<?php echo $today ?>' disabled='disabled'> </td>

                    <td width="40%"><b>User ID:</b></td>
                    <td width="60%"> 
                    <input type="text" name="userid" placeholder='<?php           
                    echo $_GET['message'];  

                <font color="#990000" size="5px">    [ Choose the appropriate status, and edit the text field for the appropriate action ] </font>


            <table border="0">   

When I var_dump($_POST); it says that ["userid"]=> string(0) while in fact, it has a placeholder value and the value is displayed, but why I can't pass it?

Any help would be very much appreciated. Thankyou.

the "placeholder" attribute (while not supported in all browsers) is a fancy way of giving a "hint" to the user as to what is supposed to go into the field. A place holder is usually something like "First Name" or "Phone Number" so when the user clicks the field, they know what they are supposed to type there. The value there ("First Name", etc..) is not the actual value of the field. If you want a default value passed in, you will need to set the value of the input, but then your placeholder would not be visibile unless the value is empty.

If you you want the GET to be passed to the form, instead of:
placeholder="<?echo ($_GET['message']);?>"
value="<?echo ($_GET['message']);?>"

Hope that helps!


commented: Yes. It helps. A lot :) Thank you so much :) +1

You should use the value attribute of input type text