Jump to content

Munali

New Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Munali

  1. Kindly help. Am a new php programmer and am learning how to HTML form data to a php script.

    Have tried several times but information on html form never get submitted. For some unknown  reasons, the codes are failing . Here are my codes:

    <html>
       <head>
           <title>Form Destination</title>
       </head>
       <body>
       <?php
        if(isset($_POST['submit']))
           {
               echo "Name: {$_POST['name']} <br/>";
               echo "Age : {$_POST['age']} <br/>";
               echo "Gender:{$_POST['gender']} <br/>";
               echo "Email:{$_POST['email']} <br/>";              
           }
           else
           {
               echo "Form was not submitted";  
           }
        ?>
       </body> 
    </html>

     

    and 

     

    <html>
      <head>
          <title>Form Source</title>
      </head>

    <body>
      <form  action="form_destination.php" method="post">
           <br/><br/>
        Name: <input type="text" name="name"/>
           <br/><br/>
        Age:&nbsp;&nbsp;&nbsp;<input type="text" name="age"/>
           <br/><br/>
        Gender: &nbsp;Male<input type="radio" name="gender" value="male"/>
        Female<input type="radio" name="gender" value="female"/>
           <br/><br/>
         Email:&nbsp;<input type="text" name="email"/>
           <br/><br/>
         <input type="submit" value="submit"/>
         
      </form>
    </body>
    </html>

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