Jump to content

Where is the mistake?


Go to solution Solved by requinix,

Recommended Posts

Please help me. I know this question is a beginner's question, now I am learning Switch Operator and  I can't understand why my code doesn't work in browser. I asked on other forums this question but people there say that there are errors in every line and that I am a fool that I don't see it. But I don't see it. I tried to write it correctly, but I don't know why it doesn't work. Please tell to a fool one where is the mistake?

 

HTML

<!doctype html>
<html>
<meta charset = "utf-8">
<head>
<body>
  <form action = "index.php" method="get">
  <tr>
  <td>What do you you select?</td>
  <select name = "find">
  <option value = "a">  A
  <option value = "b">   B
  <option value="c" >   C
  </select></td></tr>
  <input type="submit" name="submit" value="Send My Posting" />
  </form>
</body>
</html>

 

 

PHP

<?php

 $find = $_POST["find"];
 switch($find){
 case "a";
 echo "you selected A";
 break;
 case "b";
 echo "you selected B";
 break;
 case "c";
 echo "you selected C";
 break;
 
?>
 

Link to comment
https://forums.phpfreaks.com/topic/303225-where-is-the-mistake/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.