Hello, I am struggling with this piece of code...
I just want to do a simple html post to PHP with jQuery
JQuery :HTML Code:<form id="login2" name="login" method="post" action="../Main/profile.php" enctype="multipart/form-data" > <h2>Login</h2> </br> <table> <tr><td>Username: </td><td><input type="text" placeholder="Enter username" name="uUser" id="uUser1" class="formInput"></input><td></tr> <tr><td>Password: </td><td><input type="password" placeholder="Enter password" name="uPass" id="uPass1" class="formInput"></input><td></tr> </table> </br> </div> </form>
profile.phpCode:$(document).ready(function() { $("#login2").submit(); }
"not set" is displayed while I want $uUser to displayPHP Code:<?php
if($uUser = isset($_POST['login2']))
{
echo "set";
}
else
echo "not set";
echo $uUser;
?>
sorry my indentation is weird
Any help will be appreciated


Reply With Quote

Bookmarks