Jump to content

display php files in dreamweaver


ilikephp

Recommended Posts

hello, I have this form below for example:

I tried it and it works well,

but when I put it inside the dreamweaver, I see only the icon: "php"

how can I modify inside it if I want? so I can see the buttons,

because I used to remove the <?php and include in order to have the form displayed.

 

thanks...

 

 

<?php

 

    include("connect.php");

 

   

    echo " <form action=?action=form method=\"post\"> Please selcet your age : 

 

  <input type=\"radio\" name=\"age\" value=10 checked>10 years  || <input type=\"radio\" name=\"age\" value=11>11 years

 

 

  <input type=\"radio\" name=\"age\" value=12>12 years  || <input type=\"radio\" name=\"age\" value=13>13 years

 

 

  <input type=\"radio\" name=\"age\" value=14>14 years  || <input type=\"radio\" name=\"age\" value=15>15 years

 

 

 

  Now please enter your First name :

 

  <input type=\"text\" name=\"fname\" value=\"First Name\">

 

 

     

  Now please enter your Last name :

 

  <input type=\"text\" name=\"lname\" value=\"Last Name\">

 

 

 

  <input type=\"submit\" value=\"submit\"> || <input type=\"reset\" value=\"reset fields\">

 

";

 

 

  if($_GET['action'] == 'form')

 

      {

 

  if($_POST['age'] == "" | $_POST['fname'] == "" | $_POST['lname'] == "" ) { echo " Please fill all forms in "; }

 

      else

  {

 

  $age = $_POST['age'];

  $fname = $_POST['fname'];

  $lname = $_POST['lname'];

 

 

  echo "Hello ".$fname." ".$lname."  Your age is ".$age." Record enterd in the database as well.";

  mysql_query("update `members` SET first_name='$first_name', last_name='$last_name',  age='$age' ") or die(mysql_error());

 

        }

      }

?>

Link to comment
Share on other sites

  • 2 weeks later...
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.