I am currently working on a edit page where one can select a Date and edit the text he wrote that speicific date. I would like this to happen via a dropdown form (select) and then when redirecting opening the text from that date so it can be edited.
The problem is that the date in the select is from a mysql result and I dont know how to use it again after I get it via POST.
<form action="" method="POST">
                <select>
                <?php
                    foreach($test as $row) {
                        echo '<option value="'.$row['Date'].'">'.$row['Date'].'</option>';
                    }
                ?>
                </select>
            <input type="submit" value="Choose">
        </form>
So, I want to now use the selected value to search for the real text that user wrote that day with the following sql query:
$result =  "SELECT Text FROM Text '.WHERE $_POST['$row['Date']']'. = Date";
But that wont work I always get:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
Can someone show me the error and explain to me why that doesnt work? Thanks in advance!
