Thaikhan Posted August 12, 2013 Share Posted August 12, 2013 (edited) Hey guys, I'm new to the whole programming scene and am trying to setup a website. The domain is aerithea.com and I'm trying to link the logo on the top left to this php file below but it's not coming up. The anchor seems to be correct but I can't seem to figure out why it's not working. Any help would be greatly appreciated <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Member System - Login</title> </head> <body> <?php $form = "<form action='./login.php' method='post'> <table> <tr> <td>Username:</td> <td><input type='text' name='user' /></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password' /></td> </tr> <tr> <td></td> <td><input type='submit' name='loginbtn' value='Login' /></td> </tr> </table> </form>"; if ($_POST['loginbtn']) { $user = $_POST['user'] $password = $_POST['password'] if ($user) { if ($password) { echo "$user - $password <hr/> $form"; } else echo "You must enter your password. $form"; } else echo "You must enter your username. $form"; } else echo $form; ?> </body> </html> Edited August 12, 2013 by Thaikhan Quote Link to comment https://forums.phpfreaks.com/topic/281095-help-with-simple-php/ Share on other sites More sharing options...
fastsol Posted August 12, 2013 Share Posted August 12, 2013 Umm, you don't even have any images or anchor tags in the code you posted. Also please use the forums code tags to post code. Please explain better as to what you are doing cause it didn't really make much sense. Quote Link to comment https://forums.phpfreaks.com/topic/281095-help-with-simple-php/#findComment-1444634 Share on other sites More sharing options...
Solution kicken Posted August 12, 2013 Solution Share Posted August 12, 2013 $user = $_POST['user'] $password = $_POST['password'] You're missing semi-colons at the end of the lines there. Quote Link to comment https://forums.phpfreaks.com/topic/281095-help-with-simple-php/#findComment-1444636 Share on other sites More sharing options...
Thaikhan Posted August 12, 2013 Author Share Posted August 12, 2013 Thank you kicken. It was a simple fix and I just wasn't seeing it. I appreciate your help. Quote Link to comment https://forums.phpfreaks.com/topic/281095-help-with-simple-php/#findComment-1444638 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.