Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

7 Neutral

1 Follower

About Html

  • Rank
  • Birthday 03/17/1989

Profile Information

  • Location
    Greater London

Recent Profile Visitors

12,387 profile views
  1. Php.ini file?

    According to another video on the that site, to get an email confirmation sent to a user's email, it requires editing a file. But I'm thinking may be to edit the php code, which I imagine is the bottom part there, and once registered just login to a user's index, and from there can logout, post a comment to the user accounts index. I believe that would require another separate mysql database?
  2. Php.ini file?

    I see, the reason I need to change this is I downloaded a new login system, that fortunately works and is up to date compared to what I was using last month. Available on youtube, the tutorial, and the source, so I edited the files according to what I need. I now need to get a confirmation email to be sent to an email once an account has been registered. The alternative could be to remove this feature, due to what has been stated in the above posts. Once registered, and auto logged in, there is a link to click, which doesn't lead anywhere. I think verify.php is the file to get that working, as for the login part where the link is, one of the other files, I think it would be register.php // Add user to the database if ( $mysqli->query($sql) ){ $_SESSION['active'] = 0; //0 until user activates their account with verify.php $_SESSION['logged_in'] = true; // So we know the user has logged in $_SESSION['message'] = "Confirmation link has been sent to $email, please verify your account by clicking on the link in the message!"; // Send registration confirmation link (verify.php) $to = $email; $subject = 'Account Verification ( clevertechie.com )'; $message_body = ' Hello '.$first_name.', Thank you for signing up! Please click this link to activate your account: http://localhost/login-system/verify.php?email='.$email.'&hash='.$hash; mail( $to, $subject, $message_body ); header("location: profile.php"); } else { $_SESSION['message'] = 'Registration failed!'; header("location: error.php"); } } So that bit there, about verifying, I guess replace that register.php code with something else to get to a profile index, it won't be the index.php since that is the register and login form. It is a quite a nice setup. It was nice somebody setup such a modern and well design login system. I could may be just remove that bit, it is on the register.php, so that sort of becomes a Thanks for registering page once done, then from there, a comment box to post comments, now that requires a new mysql database according to another video tutorial which is about making a comment box for a user.
  3. Php.ini file?

    Hello, Where do I find a php.ini file. I am using a paid host. Thank you.
  4. Php page won't display due to permissions?

    The username is created by the system, and uses the database name. As for the directory, public_html has 755, the connect.inc. has 644, index.php the same. Registration.php 644. I changed it back to localhost, and instead of using the database, I used the username and db, which is how it appears to work with this paid host.
  5. Php page won't display due to permissions?

    I don't know about that, I setup a paid account and moved my page to that. I did everything the same over, so I'm not sure what could of caused that. I then changed the permissions now, and it states couldn't connect to the db. I used the ip address of the mysql server or localhost, it doesn't change the result of not being able to connect to the database, for a connect file and post.php file updates. On the free host I was using 644 permissions. So what would be the difference, change a few values for connecting to the database, should bring problems, could it be a php version problem?
  6. Hello, I'm not able to get a php page to display, I get the following error from visiting the page. 644 or 777 should be okay?
  7. Browser Discussion

    I guess with the phase out of flash, anyone still running an XP system, using Firefox which is still supported for it, would have less of a memory problem? Ads, and youtube for example, I still have an XP system, stopped using it in late 2016.
  8. Cloned domain from w3schools

    So somebody copied a whole site from this place
  9. Hi, While this code worked until now, I've added a new database field, so email. When I try that out, it gives an error, like as stated in the code, in the database I added email. But as for what it should be registered as in the properties, I don't know. Thank you. <?php require 'connect.inc.php'; if (isset($_POST['fname']) and isset($_POST['lname']) and isset($_POST['uname']) and isset($_POST['email']) and isset($_POST['pwd']) and isset($_POST['pwd2']) and !empty($_POST['fname']) and !empty($_POST['lname']) and !empty($_POST['uname']) and !empty($_POST['email']) and !empty($_POST['pwd']) and !empty($_POST['pwd2'])) { $fname = mysqli_real_escape_string($conn, $_POST['fname']); $lname = mysqli_real_escape_string($conn, $_POST['lname']); $uname = mysqli_real_escape_string($conn, $_POST['uname']); $email = mysqli_real_escape_string($conn, $_POST['email']); $pwd = $_POST['pwd']; $pwd2 = $_POST['pwd2']; //The mysqli_real_escape_string prevents sql injection... We are hashing the passwords, so we don't need to do it on those lines. /*This line checks to make sure the passwords match*/if ($pwd != $pwd2) { echo 'The passwords you entered didn\'t match'; } else { $check = "SELECT * FROM users WHERE uname = '$uname'"; $res = mysqli_query($conn, $check); /*This line checks to make sure the user exists*/if (mysqli_num_rows($res)>0) { echo 'That username is taken.'; } else { $sql = "INSERT INTO users (fname, lname, uname, email, pwd, ) VALUES ('$fname', '$lname', '$uname', '$email' '$pwd')"; if (!mysqli_query($conn, $sql)) { echo 'Error!'; } else { echo 'Account created! <br> Click <a href="index.php">Here</a> to login'; } } } } ?>
  10. Drop down menu

    Hi, I have posted this example, so I want day, then month and year of birth. I've made a start there, so where do I go from here? <select> <option value="">1</option> <option value="">2</option> <option value="">3</option> <option value="">4</option> <option value="">5</option> </select>
  11. Drop down menu

    Hi, I want to create a drop down menu, like used for entering a date of birth. I looked on the Learn html section, and I also tried searching, I couldn't find what I need specifically to do. Thank you.
  12. Posting comments into a Mysql database?

    In honest truth, I haven't learnt anything by memory. I just did what the video explained, and got the functioning problem solved by that guy. He left some comments as you can see. But yeah, I'm rudderless here, I don't know where to go from here.
  13. Posting comments into a Mysql database?

    Sure, but how do I learn without the knowledge, I watched the video because that was the way I could learn, and so far I have got somewhere with this, I'm stuck with this error, as well beyond once logging in, text box post text to an index page linked with the user created on the database. I need examples to continue with this.
  14. Posting comments into a Mysql database?

    Hmm, I watched the video which he explained what to do, and so on and then he made those custom clips of how to get the pages to work with the free web host since what I tried just didn't work, so i was lucky to stumble on his videos and the fact that he could respond, which I mentioned in the above posts. So what he did, was correct, could you not copy what is there and may be try on your host? I imagine you have a host free or paid. I don't know what to do, what exactly do suggest I do to get this login to work, I want to able to post to the user rich's index page, that is my goal here. I think using what is there I feel is the correct step for now, it isn't a public site, so I'm not concerned about security. The hash he provided removed or remains isn't that good at all? I remember reading about Yahoo via Yahoo news and the UK's the Guardian newspaper about not having various data encrypted well.
  15. Posting comments into a Mysql database?

    This below is what loads the index.php page, so after registration of the registration.php page, it loads again, with a link to go to the index to login. There is a comment which states account registered. <?php session_start(); require 'connect.inc.php'; if (isset($_POST['uname']) and isset($_POST['pwd']) and !empty($_POST['uname']) and !empty($_POST['pwd'])) { $uname = mysqli_real_escape_string($conn, $_POST['uname']); $pwd = $_POST['pwd']; $check = "SELECT * FROM users WHERE uname = '$uname'"; $res = mysqli_query($conn, $check); $row = mysqli_fetch_assoc($res); if (mysqli_num_rows($res)<1) { echo 'That user wasn\'t found'; } else { $pwd = PASSWORD_VERIFY($pwd, $row['pwd']); $dbuser = $row['uname']; $dbpwd = $row['pwd']; if ($uname == $dbuser and $pwd == $dbpwd) { $id = $row['id']; $_SESSION['id'] = $id; header("Location: dashboard.php"); exit(); } else { echo 'That username and password didn\'t match'; } } } ?> <!DOCTYPE html> <html> <head> <title>Login</title> </head> <body> <h3>Login</h3> <form action="dashboard.php" method="POST"> <!-- This line should have been set to the current page were editing --> <input type="text" name="uname" placeholder="Username"><br> <input type="password" name="pwd" placeholder="Password"><br> <input type="submit"> </form> <p>Click <a href="registration.php">HERE</a> to register</p> As for the code, this or that, I didn't create any of it, all based off that man's video tutorial on youtube, I lucky enough to get this working thanks to him. You clearly know much better at Pre hyper text processor language, that is something I do remember about the acronym php.