2015-02-04, 05:39 AM
The PHP code below just doesn't work for usercp.php.
The html form action="usercp.php" overrides the below PHP code, no matter what the PHP code is.
So when I click on the Edit Profile button (a button I made), it just redirects to action="usercp.php", instead of executing the PHP code below, showing "it works".
I tried action="" and it WORKS, but with a distorted page. Why does action="usercp.php" override the PHP code below?
What could be the problem?
Could someone else try copying this code on usercp.php and see if exactly the same thing happens?
I tried this on a blank test page on XAMPP, and it works, so why doesn't it work on MyBB?
The html form action="usercp.php" overrides the below PHP code, no matter what the PHP code is.
<form action="usercp.php" method="post">
<input type="submit" class="button" name="editprofile" value="Edit Profile" />
</form>
So when I click on the Edit Profile button (a button I made), it just redirects to action="usercp.php", instead of executing the PHP code below, showing "it works".
I tried action="" and it WORKS, but with a distorted page. Why does action="usercp.php" override the PHP code below?
global $mybb;
if(isset($mybb->input['editprofile'])) {
echo 'it works';
die();
}
What could be the problem?
Could someone else try copying this code on usercp.php and see if exactly the same thing happens?
I tried this on a blank test page on XAMPP, and it works, so why doesn't it work on MyBB?