Jump to content

[SOLVED] help


saradrungta

Recommended Posts

For example:

index.php

<form action="buy_snacks.php" method="post">
<select multiple name="snacks[ ]">
  <option value="coke">CocaCola</option>
  <option value="popcorn">Popcorn</option>
  <option value="peanuts">Peanuts</option>
</select>
</form>

 

buy_snacks.php

$snacks = $_POST['snacks'];
foreach ($snacks as $s) {
  echo "$s<br />";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/134219-solved-help/#findComment-698655
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.