Jump to content

Html

Members
  • Content count

    345
  • Joined

  • Last visited

Community Reputation

7 Neutral

1 Follower

About Html

  • Rank
    Member
  • Birthday 03/17/1989

Profile Information

  • Location
    Greater London

Recent Profile Visitors

12,856 profile views
  1. Html

    Php.ini file?

    I viewed Amazon UK for books, they aren't many there. Some are too expensive. When i was in college eleven years back, the course manager expressed that he was more of a visual learner, he wasn't good with website design, he was more into Visual studio, so VB.net, and Visual basic. It was one of those year courses, that teach a little theory, and some practical on networking like LANs, and all that sort of stuff. I couldn't go further with it, I was lucky to pass the course, as it required certain certificate results I didn't have. I then tried to keep at web design, back then just as youtube arrived, and visual basic, but I gave up on that, as time went along. There were other problems at the time, so it wasn't practical in the end. I feel like I'm at square one, I guess we all have genetic problems LOL, some manifest at some point or another. But I guarantee, nobody on that course I was on succeeded with IT, they just weren't the stereotypes, I could tell my course manager had no faith in them or eventually myself, as time went by. And some didn't even like the subject, it was just a try. When I was on the course before, the year before that, it was full of under achievers, so yeah, to go up the ropes, in subjects that require you know, somebody who works at facebook, or one of those infamous hackers out there, who may of been real great with languages, ended up dead because of their madness, and illegality. Bit off topic here. Right, so what should I do then, okay, what book would you suggest?
  2. Html

    Php.ini file?

    Sure, and I tried to get a comment section working, but the video tutorial didn't go into detail or something was a bit different, and it didn't work out. I then tried to get a profile.php to display that name once registered, like a link, that was the last task I tried with you and the other user gave me some points, but I couldn't that going, I don't know the theory, and there aren't any examples on youtube about this in particular, how to display a profile index of a registered name. That is going to be needed, once a comment is posted, as that is where they could be viewable, I guess they could be seen in the profile login section, but that isn't really the task.
  3. Html

    Php.ini file?

    I haven't touched any of this since I last posted here, I don't know what to do. I've read a little of those links, yeah I mean I need video, that is much better. As for the email link, and all that, I did remove that, so once registered, logged into profile.php it just has a textbox, and has a statement stating account created, which remains there. So from there, I want to be able to post to the registered name, now the profile.php requires a session for that user, that is obviously what is missing from the profile.php I pasted last month here. <?php /* Displays user information and some useful messages */ session_start(); // Check if user is logged in using the session variable if ( $_SESSION['logged_in'] != 1 ) { $_SESSION['message'] = "You must log in before viewing your profile page!"; header("location: error.php"); } else { // Makes it easier to read $first_name = $_SESSION['first_name']; $last_name = $_SESSION['last_name']; $email = $_SESSION['email']; $active = $_SESSION['active']; } $user_id=""; if ($_SERVER["REQUEST_METHOD"] == "GET") { if (isset($_GET["id"])) { $user_id=$_GET["id"]; } ///process profile to id retrieved } date_default_timezone_set('Europe/London'); include 'comments.php.inc'; include 'connect.inc.php'; ?> <!DOCTYPE html> <html > <head> <meta charset="UTF-8"> <title>Welcome <?= $first_name.' '.$last_name ?></title> <?php include 'css/css.html'; ?> </head> <body> <div class="form"> <h1>Welcome</h1> <a href="profile.php?id=<?php echo $user_id; ?>"><button class="button button-block" name="View profile"/>View profile</button></a> <br> <p> <?php // Display message about account verification link only once if ( isset($_SESSION['message']) ) { echo $_SESSION['message']; // Don't annoy the user with more messages upon page refresh unset( $_SESSION['message'] ); } ?> </p> <?php // Keep reminding the user this account is not active, until they activate if ( !$active ){ echo '<div class="info"> Account Created! </div>'; } ?> <?php echo "<form method='POST' Action='".setComments."'> <input type='hidden' name='uid' value=''> <input type='hidden' name='date' value='".date('Y-m-d H:M:S')."'> <textarea name='message'></textarea> <button type='submit' name='commentSubmit'>Comment</button> </form>"; ?> <h2><?php echo $first_name.' '.$last_name; ?></h2> <p><?= $email ?></p> <a href="logout.php"><button class="button button-block" name="logout"/>Log Out</button></a> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script> </body> </html> The bottom section was from the video example, so you can see that textbox area, that doesn't work goes to 404, but yeah, that was a problem. But the comments needed to go with the right name. There is also a verify php page, as you stated an email verification required more of a technical change that a web host wouldn't permit, so as stated I removed that part, I doubt that is still needed for my small task. <?php /* Verifies registered user email, the link to this page is included in the register.php email message */ require 'db.php'; session_start(); // Make sure email and hash variables aren't empty if(isset($_GET['email']) && !empty($_GET['email']) AND isset($_GET['hash']) && !empty($_GET['hash'])) { $email = $mysqli->escape_string($_GET['email']); $hash = $mysqli->escape_string($_GET['hash']); // Select user with matching email and hash, who hasn't verified their account yet (active = 0) $result = $mysqli->query("SELECT * FROM users WHERE email='$email' AND hash='$hash' AND active='0'"); if ( $result->num_rows == 0 ) { $_SESSION['message'] = "Account has already been activated or the URL is invalid!"; header("location: error.php"); } else { $_SESSION['message'] = "Your account has been activated!"; // Set the user status to active (active = 1) $mysqli->query("UPDATE users SET active='1' WHERE email='$email'") or die($mysqli->error); $_SESSION['active'] = 1; header("location: success.php"); } } else { $_SESSION['message'] = "Invalid parameters provided for account verification!"; header("location: error.php"); } ?>
  4. Html

    Php.ini file?

    Well my task hasn't changed, I want a registration name which becomes an account profile to have it's own comment box to post to a db, which then displays that on a profile index page, along with a upload image feature. Eventually with the ability to have a message inbox, outbox system. Seems the correct path to go for the moment.
  5. Html

    Php.ini file?

    I had a look back at the example post there. This is the logout from the files I downloaded from a youtube clip a few months ago, it works, but doesn't login to a profile section, it logins for a confirmation, but I changed that to no longer have that, but I want for any new registration names which are the accounts, as I stated in the previous posts. This is the logout from the files. <?php /* Log out process, unsets and destroys session variables */ session_start(); session_unset(); session_destroy(); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Error</title> <?php include 'css/css.html'; ?> </head> <body> <div class="form"> <h1>Thanks for stopping by</h1> <p><?= 'You have been logged out!'; ?></p> <a href="index.php"><button class="button button-block"/>Home</button></a> </div> </body> </html> So this isn't included, this example is some sort of array, I'm going to need something like this to do what, connect with a sql database, which the numbers are lists int he db. $userArray = [ [5, 'wroxbooks', 'wroxbooks', 'wroxbooks@wroxbooks.com', '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>'], [11, 'thatbook', 'thatbookp', 'thatbook@thatbook.com', '<p>Fusce convallis, mauris imperdiet gravida bibendum, nisl turpis suscipit mauris, sed placerat ipsum urna sed risus. In convallis tellus a mauris. Curabitur non elit ut libero tristique sodales. Mauris a lacus. Donec mattis semper leo. In hac habitasse platea dictumst. Vivamus facilisis diam at odio. Mauris dictum, nisi eget consequat elementum, lacus ligula molestie metus, non feugiat orci magna ac sem. Donec turpis. Donec vitae metus. Morbi tristique neque eu mauris. Quisque gravida ipsum non sapien. Proin turpis lacus, scelerisque vitae, elementum at, lobortis ac, quam. Aliquam dictum eleifend risus. In hac habitasse platea dictumst. Etiam sit amet diam. Suspendisse odio. Suspendisse nunc. In semper bibendum libero.</p>'], [43, 'otherbook', 'otherbookp', 'otherbook@otherbook.com', '<p>Proin nonummy, lacus eget pulvinar lacinia, pede felis dignissim leo, vitae tristique magna lacus sit amet eros. Nullam ornare. Praesent odio ligula, dapibus sed, tincidunt eget, dictum ac, nibh. Nam quis lacus. Nunc eleifend molestie velit. Morbi lobortis quam eu velit. Donec euismod vestibulum massa. Donec non lectus. Aliquam commodo lacus sit amet nulla. Cras dignissim elit et augue. Nullam non diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In hac habitasse platea dictumst. Aenean vestibulum. Sed lobortis elit quis lectus. Nunc sed lacus at augue bibendum dapibus.</p>']]; if (isset($_SESSION['user_id']) && !empty($_SESSION['user_id'])) { foreach ($userArray as $key => $row) { if ($userArray[$key][0] == $_SESSION['user_id']) { $user_id = $key; } } }
  6. Html

    who is top web developer and designee here??

    That is interesting, so this place is pretty much a forum online with moderators, and some administrators.
  7. Html

    Should I or shouldn’t I?

    That is a question only you can answer. I guess you have learnt Html 5. Do you use books at all? As for learning entirely, that would be sometime, a year or two I would think. I have never gotten far with any of this, simply, because my mind isn't focused on languages, I imagine, not sure what could be exactly, a learning difficulty may be, I don't know. Some people can learn this subject others struggle, and get by, and many give up. I was looking at SQL developer job roles, I imagine it was for may be Twitter, but required computer science for a role at an IT company, now of course is more programming, but similarities with web languages. I haven't a chance of ever doing that like on a free lance or something, not sure how these jobs actually work out, but yeah there going to be local to a company.
  8. Html

    Php.ini file?

    Ah I see, The host I use, has a plan for £50 for a year or something. I use a basic £11.39p hosting per month, only when I can, so I have to cancel if I don't have that amount. So this certificate authentication isn't really cheap, it is separate from a package. The free host I use is ad based, and just for the testing, has no real features, sub domains, but that is it, free forum packages and all that, but pretty pointless in learning php 7/mysql. Obviously I'm trying to create an account registration site, so something really basic like I've stated in the previous posts, sadly I can't get anywhere with this. The whole certificate cost is out of the question, I can only just try and make the site work. I'm stuck with that.
  9. Html

    Php.ini file?

    Hmm, so what can you inform on this, what do I need to do to have a padlock for just simply registering to begin with, that wasn't on the free host or the paid host I am using.
  10. Html

    Php.ini file?

    Okay, that wasn't any help. I wanted to inquire, what about secure transfer for data, like a secure connection. I don't have one of those on the host I am using.
  11. Html

    Php.ini file?

    This tutorial may assist me with what I'm trying to do. https://www.youtube.com/watch?v=zvXgsouIzVg
  12. Html

    Php.ini file?

    Right, I thought that was the key to the problem. So now the login page requires the code he has pasted, catered to what I have there or use that and edit it.
  13. Html

    Php.ini file?

    I pasted that bit of code from Justsomeguy, it didn't actually do anything, it stopped the page from working, so I removed it.
  14. Html

    Php.ini file?

    Right, and what does that new link do? It only loads as profile.php?= As for Justsomeguy's post, that code fits into the profile php file $stmt = $pdo->prepare('SELECT id, username FROM users ORDER BY username ASC'); $stmt->execute(); $accounts = $stmt->fetchAll(); foreach ($accounts as $account) { echo '<a href="profile.php?id=' . $account['id'] . '">' . $account['username'] . '</a><br>'; }
  15. Html

    Php.ini file?

    Okay from the top, so the code I put into the profile has that link, as well as the get code that dsonesuk mentioned in the previous post. I left that out, so there is no link in that part there. $user_id=""; <body> <div class="form"> <h1>Welcome</h1> <a href="profile.php?id-1"><button class="button button-block" name="View profile"/>View profile</button></a> <p>
×