Html Form Seemingly Not Posting To Php
Solution 1:
There is no action
set in your <form>
tag and it is sending the data to the same file. i.e., myaccount.inc.php
.
Change it to:
<form class="clearfix" action="accountController.php" method="post">
Solution 2:
The problem is you are including the
<?php include_once 'controllers/accountController.php'; ?>
after the headers have been sent.
You can either move the
<?php include_once 'controllers/accountController.php'; ?>
to the top of the page, inside the handler part, or you can submit the form to
controllers/accountController.php
using
<form class="clearfix" action="controllers/accountController.php" method="post">
Solution 3:
Try this :
Give form action to accountController.php
<form class="clearfix" action="accountController.php" method="post">
Solution 4:
change your action
to this,because accountController.php
is present inside controllers
folder.
<form class="clearfix" action="controllers/accountController.php" method="post">
Solution 5:
mysqli is a class, and the it's function query is not static so there, you must declare an instance of the mysqli class before you can use $mysqli->query
.
You should put
$mysqli = new mysqli('localhost', 'my_user', 'my_password', 'my_db');
before
$sql = $mysqli->query("SELECT * FROM ss_members WHERE usr = '".$_SESSION['usr']."' AND pass = '".md5($_POST['password'])."'");
Post a Comment for "Html Form Seemingly Not Posting To Php"