一个字段没有在php中提交值

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

its a complaint registration form.The created by field is not submitting its //value on on submit.

    <?php
//to display contents after posting in same page
    if (isset($_POST['submit'])) 
    {

    $createdby = $_POST["createdby"];

//its a complaint registration form.The created by field is not submitting its //value on on submit.

    echo "createdby:".$createdby." <br>";

    }

//its a complaint registration form.The created by field is not submitting its //value on on submit.

    echo "<script>window.close();</script>";

    ?> 



    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../user.css"/>
    <title>User registration</title>


    //for validation

    <script src="jquery.js" type="text/javascript"></script>
     <script src="jquery.validate.js" type="text/javascript"></script>

     <script type="text/javascript">
     $(document).ready(function() {
             $("#usertype").validate();
     });

    //even date time picker is not working
     $(function() {
    $( "#datepicker" ).datepicker();
    });



     </script>
    </head>
    //its a complaint registration form.The created by field is not submitting its //value on on submit.
    <body>



    //the form containing the fields


    <form id="usertype" action="  " method="get" >
     <center>
     <h1> User Registration Page </h1>
     <div id="content">




         ***<ul class="user">
                    <li class="label">Created by</li>
                    <li class="field">
                     <input type="text" id="createdby" name"createdby" class="required error"/>
                     </li>
                    </ul>***

//submitting the form

        <input type="submit" name="submit" value="Submit"/>
        </div>
    </center>
    </form>
    </body>
    </html>

//its a complaint registration form.The created by field is not submitting its //value on on submit.strong text

You have a missing equal sign in name attribute of createdby field

You can't get $POST value while having form method set to GET. Either change form method or part of php code:

if (isset($_GET['submit'])) 
    {

    $createdby = $_GET["createdby"];

Best regards, Vladimir

<input type="text" id="createdby" name="createdby" class="required error"/>

so your input field is not exist and $_POST["createdby"]; is null

simply change form action to post

<form id="usertype" action="  " method="get" > to
<form id="usertype" action="  " method="post" > or

change $_POST to$_GET

<?php
//to display contents after posting in same page
    if (isset($_POST['submit'])) 
    {

    $createdby = $_POST["createdby"];
?>

to

<?php
    //to display contents after posting in same page
        if (isset($_GET['submit'])) 
        {

        $createdby = $_GET["createdby"];
    ?>