Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
PHP UserLogin Problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="St4nley" data-source="post: 220705" data-attributes="member: 31081"><p>Hello, i'm following a phpacademy tutorial which i must say is good but that man needs to slow the fuck down. but anyways in the tutorial i have entered the same code</p><p>[CODE]<?php</p><p>include 'core/init.php';</p><p> </p><p>if (empty($_POST) === false) {</p><p> $username = $_POST['username'];</p><p> $password = $_POST['password'];</p><p> </p><p> if ($username&&$password)</p><p> {</p><p> $connect = mysql_connect("localhost,"root","password") or die ("couldn't connect");</p><p> mysql_select_db("lr") or die ("Couldn't Find Db");</p><p> </p><p> }</p><p> else</p><p> die("please enter a username and a password");</p><p> </p><p> }</p><p> </p><p>?>[/CODE]</p><p>thats my login.php</p><p>i submit my premade username and password that i made in the database, and i get no result just the page reloads, also when i went to localhost/login.php i got this error</p><p><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">Parse error</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">: syntax error, unexpected T_STRING in </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">C:\xampp\htdocs\lr\login.php</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"> on line </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">10</span></span></span></strong></p><p> </p><p><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"><strong>What am i doing wrong?</strong></span></span></span></p><p><span style="font-size: 12px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"><strong>Thanks!, Stanley</strong></span></span></span></p></blockquote><p></p>
[QUOTE="St4nley, post: 220705, member: 31081"] Hello, i'm following a phpacademy tutorial which i must say is good but that man needs to slow the fuck down. but anyways in the tutorial i have entered the same code [CODE]<?php include 'core/init.php'; if (empty($_POST) === false) { $username = $_POST['username']; $password = $_POST['password']; if ($username&&$password) { $connect = mysql_connect("localhost,"root","password") or die ("couldn't connect"); mysql_select_db("lr") or die ("Couldn't Find Db"); } else die("please enter a username and a password"); } ?>[/CODE] thats my login.php i submit my premade username and password that i made in the database, and i get no result just the page reloads, also when i went to localhost/login.php i got this error [B][SIZE=4][FONT=Times New Roman][COLOR=#000000]Parse error[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000]: syntax error, unexpected T_STRING in [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]C:\xampp\htdocs\lr\login.php[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000] on line [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]10[/COLOR][/FONT][/SIZE][/B] [SIZE=3][FONT=Times New Roman][COLOR=#000000][B]What am i doing wrong?[/B][/COLOR][/FONT][/SIZE] [SIZE=3][FONT=Times New Roman][COLOR=#000000][B]Thanks!, Stanley[/B][/COLOR][/FONT][/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
PHP UserLogin Problem
Top