html - PHP not able to access POST values -


i have html login form processed , displayed user php if not logged in. form set post /user.php in turn accesses authentication class, , either creates session , returns true or false , not log user in.

my problem whatever try, html form not post values php processing part.

this current source code:

log in form:

<div class="panel-body">                         <!-- begin ifloginerror -->                         <div class="alert alert-danger">                             <p>either username or password incorrect. please try again. <a href="" class="alert-link">forgotten password?</a></p>                         </div>                         <!-- end ifloginerror -->                         <form class="form-horizontal" method="post" action="{root}/user.php">                             <div class="form-group">                                 <label for="username" class="col-sm-2 control-label">username</label>                                 <div class="col-sm-10">                                     <input type="text" class="form-control" id="username" value="" placeholder="your username">                                 </div>                             </div>                             <div class="form-group">                                 <label for="password" class="col-sm-2 control-label">password</label>                                 <div class="col-sm-10">                                     <input type="password" class="form-control" id="password" value="" placeholder="your password">                                 </div>                             </div>                             <div class="form-group">                                 <div class="col-sm-offset-2 col-sm-10">                                     <input type="submit" class="btn btn-default" value="sign in" />                                 </div>                             </div>                         </form>                     </div> 

user.php (as stands):

echo "<pre>"; var_dump($_post); var_dump(file_get_contents("php://input")); echo "</pre>"; phpinfo(); 

both var_dumps return following, suggesting form not posting:

array(0) { } string(0) "" 

what doing wrong here?

you haven't given <input>s name attribute.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -