Jump to content

supergrame

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

About supergrame

  • Birthday 12/19/1984

Profile Information

  • Gender
    Male
  • Location
    New Zealand

supergrame's Achievements

Member

Member (2/5)

0

Reputation

  1. were this line is if($_POST['username'] == "bob") can i just add a database query right in there
  2. ahh thank you that is much easier for me to work with im still in the beginner stage.. I think i jumped in over my head, hehe thank you I will post here again in an hour or so and let you know how i got on.
  3. hey thanks for that im trying to get my head around it. its so confusing. i guess time and practices is all i need
  4. Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in the right direction... here is my problem. I have index.php in that file i have included login.php witch has the php and the html to produce the login form and the php to cheak the database. now what i want... How can i produce errors like username doesnot exist or password incorect stuff like that but I want that to be on the index.php page with out it going to a new page and displaying wrong username/password. I just need to know what to look for so i can google it and do my own research as to how this works. Thnak you
  5. again sorry for the double posting I think it is because there is php and html in that page and for some reason it keeps redirecting it over and over and over. I will take another look in the morning. your help is much appreciated
  6. Ahh yes. How stupid of me sorry for the time wasting Been working on this for over 10 hours starting to get tired. ok well that did work but now for the new error lol The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies. taking a stab im guessing its my sessions code? I was using the old sessions but my browsers keeps saying its old code don't use it
  7. here is login.php aswell <?php include("dbconnect.php"); $username=$_POST['username']; $password=$_POST['password']; if (!isset($username) || !isset($password)) { header("Location:index.html"); } elseif (empty($username) || empty($password)) { header("Location:index.html"); } else{ $result=mysql_query("select * from members where username='$username' AND password='$password'"); $rowCheck = mysql_num_rows($result); if($rowCheck > 0){ while($row = mysql_fetch_array($result)){ session_start(); $_SESSION['username'] = "$username"; echo 'Success!'; header("Location:members/membersIndex.php"); } } else { echo 'Incorrect login name or password. Please try again.'; } } ?> <html> <form class="login" action="login.php" method="POST"> Please login below!<br /> <label>User name:</label> <input type="text" name="username"/> <label>Password:</label> <input type="password" name="password" /> <input type="submit" value="Login"/><br /> Not a member? <a href="register.html">Register</a><br /> Forgot your password click <a href="forgotPassword.html">HERE!</a> </form> </html>
  8. I know you said don't keep posting but i think this is valuable info to save some time. in dreamweaver i click inside this line of code <div id="sidebar" class="border"> and at the bottom of dreamweaver this is the error.. Invalid markup marked invalid because its an overlapping or unclosed tag if the display looks correct it is safe to delete these tags ok so i get rid of this <?php and just use <? and it works but it does not include login.php very frustrating
  9. yes that is correct here is the index.php file content <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="styles.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Smoking</title> </head> <body> <div id="container"> <div id="header" class="border"><h1>Smokin</h1></div> <div id="navbar" class="border"> <a href="index.html">Home</a> | <a href="forum.php">Forum</a> | <a href="growingguides.html">Growing</a> | <a href="about.html">About</a> | <a href="contact.html">Contact</a> </div> <div id="sidebar" class="border"> <?php include("login.php"); ?> </div> <div id="contentIndex" class="border"> <h2>Welcome to <a href="www.smokin.com">www.smokin.com</a> <p class="content">What you will find on this website!</p> <ol class="content"> <li>Indoor Growing tips and Guides</li> <li>Outdoor Growing tips and Guides</li> <li>IRC chat client setup help for all your marijuana chatting needs</li> <li>Much much more to come</li> </ol> <p class="content">Look around have a bong and don't forget to tell your friends</p> </div> <div id="footer" class="border"> <P class="footer">smokin 2009 © Powerd by <a href="www.superwebs.com">Superwebs</a></P> </div> </div> </body> </html> if i remove the one PHP line it works with the .php ext
  10. ok after alot of reinstalling and messing around with wamp server. It was nothing to do with it. it was this one line of code im my index.php file <?php include("login.php"); ?> I dont understand
  11. ok sorry... Yes it is local on my PC. and yes php is working.
  12. would it have anything to do with this <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="styles.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in index.php ?
  13. maybe is could be a file association issue. Just giving some ideas
  14. THE ERROR Not Found The requested URL /index.html was not found on this server. this is what i put in the URL: http://127.0.0.1/index.php http://localhost/index.php very odd
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.