A Little Noise

November 14, 2005

Form Names

Filed under: PHP Gotchas — snoyes @ 4:00 am

Given the following page:

<form>
  <input type="radio" name="BT.123" value="active" />
  <input type="radio" name="BT.123" value="inactive" />
  <input type="submit" value="Submit" />
</form>

<?php
  echo "GET: ", $_GET['BT.123'];
  echo "POST: ", $_POST['BT.123'];
  echo "REQUEST: ", $_REQUEST['BT.123'];
?>

Assume the “inactive” button is checked and the form is submitted. What is the output?
Show Answer ▼

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress