是否可以在下拉菜单中$ _POST值的值?

For example

<select>
<?php

$option1 = $row['first']
$option2 = $row['last']
$thisval = $row['id']


echo "
     <option value='$thisval'>$option1 $option2</option> ";

?>
</select>

I am trying to $_POST['option']['value']?? and $_GET['option'] for my query in my post page. I believe my syntax is incorrect.

How do you find the value of Option in $_GET?

Make sure the select has a name.

<select name="foo">
    <option value="bar">bar</option>
</option>

Then in $_GET (or $_POST) you will have $_GET["foo"] with value bar.

so you want to display POST data in a dropdown field? Try this.

<select>
<?php foreach($_POST as $option => $value){ ?>
  <option value='$value'>$option</option>
<?php } ?>
</select>

Your select element needs a name.

<select name="myOptions">
    <option value='$thisval'><?php echo "$option1 $option2" ; ?></option>
</select>

In your post, you'd do $_POST['myOptions'].