Jump to content

Html

Members
  • Posts

    640
  • Joined

  • Last visited

Everything posted by Html

  1. Html

    user id

    <?php ini_set('display_errors', 1); error_reporting(E_ALL); # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, first_name, last_name FROM users WHERE email='$user_id'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; return array( true, $row ) ; { echo '<tr><td>' . $row['first_name'] .' '. $row['last_name'] . '<br>'. </td><td>' . </td> </tr>'; } echo '</table>' ; } ?> Still nothing as is, I did try changing the $q to $user_id
  2. Html

    user id

    What..😶 So it was user_id but with the symbol. I learn quite late then.
  3. Html

    user id

    I thought I made some progress with at least getting what I needed, okay the book I have Php 7 in Easy steps has the forum tutorial, there is no $e, that would be in the Mysql book obviously, which I don't have so I can't state what that means, obviously email or what ever, as I got this from the link the other user posted on here, which solved the whole login problem I was having, since I no longer had to workout what to do, and going nowhere with it. Okay, getting back to this, <?php # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, first_name, last_name FROM users WHERE id='$id'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; return array( true, $row ) ; { echo '<tr><td>' . $row['first_name'] .' '. $row['last_name'] . '<br>'. </td><td>' . </td> </tr>'; } echo '</table>' ; } ?> May be this might do it?
  4. Html

    user id

    Okay everyone, I used the code from the site, i don't have a book of that exact code I have used, I thought I mentioned in previous posts, I did, but you folks forgot. I am using the code from the forum of which I have that book to create this profile.php, okay, as shown above. And yes I do agree copying pasting isn't the way to go about creating code to get a task going and done, but for the page setup I used what there was, as for the code from the forum, yes I did copy and paste, for ease, as when I did the first time, I got the spacing wrong which caused errors as well not having the right words, and characters in certain places. As for $e I don't know, that is what the code displays. I will check the php 7 book again.
  5. Html

    user id

    So it is like this, a lot simpler than I thought then.. <?php # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, first_name, last_name FROM users WHERE email='$e'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; return array( true, $row ) ; { echo '<tr><td>' . $row['first_name'] .' '. $row['last_name'] . '<br>'. </td><td>' . </td> </tr>'; } echo '</table>' ; } ?> I did login, and then typed profile.php, nothing is displayed, obviously something with the code, structure problem may be.
  6. Html

    user id

    $q = "SELECT user_id, FROM users WHERE email='user_id'" ; Right, well id is 1, but you are getting at there needs to be some kind of id name for the user_id as is here <?php # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, FROM users WHERE email='user_id'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; } ?> So we need print code in this above, So this below, some of it can be inserted in, $sql = 'SELECT * FROM USERS' ; $result = mysqli_query( $dbc, $sql ) ; if ( mysqli_num_rows( $result ) > 0 ) { echo '<table><tr><th>Posted By</th><th id="id">Mes</th></tr>'; while ( $row = mysqli_fetch_array( $result , MYSQLI_ASSOC )) { echo '<tr><td>' . $row['user_id'] . '</td> </tr>'; } echo '</table>' ; } mysqli_close( $dbc ) ; I took this from the forum code, and made some changes. I don't know where to go from here, with the table removal for a print name?
  7. Html

    user id

    As it stands, I want to have the page which is obviously linked with the registered user, well I would want to load a comment from the db, which is posted from the user control panel area, but for the moment, I just simply want the page identified with that user id, and I guess not forgetting the first name and last name of the user can be displayed, top center on that profile index page. user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, That is from the db code to make a table.
  8. Html

    user id

    I used the code from two pages, what seemed like the right step. I wasn't sure what to do. <?php # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, FROM users WHERE email='user_id'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; } ?> Would this be a step forward? As for $dbc, well that is from the code, whether to remove or keep, that is from the Php & MYSQL book, in the php 7 book, which you noted it not really being much of anything to do with php 7, it is also used for require.php so a connection script. Database connection is what it stands for I guess.
  9. Html

    user id

    I would like to load an index page for that registered user which accessible via the navigation as seen in the code so instead of shop will be profile index so profile.php, which would display a comment posted from the home.php of that user which I would use from the post comment code from the book. So just a task of trying to get it connected. I thought the example above is probably the correct step, if so what do I do now? And if not, what can I do to get this linking together. Lastly the page would be viewable by any user, but not to post a comment, I haven't a clue how I could get that to sort of work out. So far now, i'm just getting something basic, a lot like this forum, view you're own profile, login you know that sort of thing, just really bare bones.
  10. Html

    user id

    <?php # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, first_name, last_name FROM users WHERE email='$e'" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; return array( true, $row ) ; } ?> Well this is for a profile.php so would load the first and last name from the db as seen, obviously to display a new page which is connected with those registered details. I am uncertain where to go with this.
  11. Html

    user id

    Hi, Okay, I'm going to need some pointers, can I setup a profile.php with the code that will use a session to grab the id from a user? For a change I thought why not view the sessions here on this site php 5 sessions I guess they are good to use, https://www.w3schools.com/php/php_sessions.asp <?php // Start the session session_start(); ?> <!DOCTYPE html> <html> <body> <?php // Set session variables $_SESSION["favcolor"] = "green"; $_SESSION["favanimal"] = "cat"; echo "Session variables are set."; ?> So "1" needs an index page, So home.php <html> <body> <center> <img src="header2018may15.jpg"> </center> <?php # DISPLAY COMPLETE LOGGED IN PAGE. # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # Set page title and display header section. $page_title = 'Home' ; include ( 'includes/header.html' ) ; # Display body section. echo "<h1>HOME</h1><p>You are now logged in, {$_SESSION['first_name']} {$_SESSION['last_name']} </p>"; # Create navigation links. echo '<p><a href="forum.php">Forum</a> | <a href="shop.php">Shop</a> | <a href="goodbye.php">Logout</a></p>'; # Display footer section. include ( 'includes/footer.html' ) ; ?> <br /> <br /> <br /> <img src="bottomheader.jpg"> </body> </html> As seen there is a session identifier there with name and last name, so this page knows to use what is from the db I would think, # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } This part here is looking to login_tools, so that is where the the logic is, # On success retrieve user_id, first_name, and last name from 'users' database. if ( empty( $errors ) ) { $q = "SELECT user_id, first_name, last_name FROM users WHERE email='$e' AND pass=SHA2('$p',256)" ; $r = mysqli_query ( $dbc, $q ) ; if ( @mysqli_num_rows( $r ) == 1 ) { $row = mysqli_fetch_array ( $r, MYSQLI_ASSOC ) ; return array( true, $row ) ; } This above is from login tools, so I could use that above, <?php ?> I did read through the sessions in the Learning Php book, and looked at some of the code examples, just no good for me.
  12. I see, there is a small chapter in the easy book, about sessions but using a cookie to store login details. That obviously doesn't apply to this. The good news is this login system works as is, just needs a comment box to post to a user index, as well a index link to go to it. I renamed post to post2 for the comment system, since the post.php is also used for registering on the account system too.
  13. What I would need to do is, using what I have is, the profile page would need to load once registered a name, I'm sure some out of date code can be inserted into one of the pages. I guess on the register page some sort of extra code like the id part from the example files can be added with that, from what I can remember you stated that "1" is one user, so the php has to be able read that, but individually, so not to login with just one user. Taken from the downloaded files. <?php # DISPLAY COMPLETE REGISTRATION PAGE. # Set page title and display header section. $page_title = 'Register' ; include ( 'includes/header.html' ) ; # Check form submitted. if ( $_SERVER[ 'REQUEST_METHOD' ] == 'POST' ) { # Connect to the database. require ('../connect_db.php'); # Initialize an error array. $errors = array(); # Check for a first name. if ( empty( $_POST[ 'first_name' ] ) ) { $errors[] = 'Enter your first name.' ; } else { $fn = mysqli_real_escape_string( $dbc, trim( $_POST[ 'first_name' ] ) ) ; } # Check for a last name. if (empty( $_POST[ 'last_name' ] ) ) { $errors[] = 'Enter your last name.' ; } else { $ln = mysqli_real_escape_string( $dbc, trim( $_POST[ 'last_name' ] ) ) ; } # Check for an email address: if ( empty( $_POST[ 'email' ] ) ) { $errors[] = 'Enter your email address.'; } else { $e = mysqli_real_escape_string( $dbc, trim( $_POST[ 'email' ] ) ) ; } # Check for a password and matching input passwords. if ( !empty($_POST[ 'pass1' ] ) ) { if ( $_POST[ 'pass1' ] != $_POST[ 'pass2' ] ) { $errors[] = 'Passwords do not match.' ; } else { $p = mysqli_real_escape_string( $dbc, trim( $_POST[ 'pass1' ] ) ) ; } } else { $errors[] = 'Enter your password.' ; } # Check if email address already registered. if ( empty( $errors ) ) { $q = "SELECT user_id FROM users WHERE email='$e'" ; $r = @mysqli_query ( $dbc, $q ) ; if ( mysqli_num_rows( $r ) != 0 ) $errors[] = 'Email address already registered. <a href="login.php">Login</a>' ; } # On success register user inserting into 'users' database table. if ( empty( $errors ) ) { $q = "INSERT INTO users (first_name, last_name, email, pass, reg_date) VALUES ('$fn', '$ln', '$e', SHA2('$p',256), NOW() )"; $r = @mysqli_query ( $dbc, $q ) ; if ($r) { echo '<h1>Registered!</h1><p>You are now registered.</p><p><a href="login.php">Login</a></p>'; } # Close database connection. mysqli_close($dbc); # Display footer section and quit script: include ('includes/footer.html'); exit(); } # Or report errors. else { echo '<h1>Error!</h1><p id="err_msg">The following error(s) occurred:<br>' ; foreach ( $errors as $msg ) { echo " - $msg<br>" ; } echo 'Please try again.</p>'; # Close database connection. mysqli_close( $dbc ); } } ?> <!-- Display body section with sticky form. --> <h1>Register</h1> <form action="register.php" method="post"> <p>First Name: <input type="text" name="first_name" size="20" value="<?php if (isset($_POST['first_name'])) echo $_POST['first_name']; ?>"> Last Name: <input type="text" name="last_name" size="20" value="<?php if (isset($_POST['last_name'])) echo $_POST['last_name']; ?>"></p> <p>Email Address: <input type="text" name="email" size="50" value="<?php if (isset($_POST['email'])) echo $_POST['email']; ?>"></p> <p>Password: <input type="password" name="pass1" size="20" value="<?php if (isset($_POST['pass1'])) echo $_POST['pass1']; ?>" > Confirm Password: <input type="password" name="pass2" size="20" value="<?php if (isset($_POST['pass2'])) echo $_POST['pass2']; ?>"></p> <p><input type="submit" value="Register"></p> </form> <?php # Display footer section. include ( 'includes/footer.html' ) ; ?> So this part is from the example files of the older stuff I had been hanging onto for half a year now. $user_id=""; if ($_SERVER["REQUEST_METHOD"] == "GET") { if (isset($_GET["id"])) { $user_id=$_GET["id"]; } ///process profile to id retrieved } And then, home.php As you can see there is even a shop page, not sure if the book contained a full chapter on a task like that. <?php # DISPLAY COMPLETE LOGGED IN PAGE. # Access session. session_start() ; # Redirect if not logged in. if ( !isset( $_SESSION[ 'user_id' ] ) ) { require ( 'login_tools.php' ) ; load() ; } # Set page title and display header section. $page_title = 'Home' ; include ( 'includes/header.html' ) ; # Display body section. echo "<h1>HOME</h1><p>You are now logged in, {$_SESSION['first_name']} {$_SESSION['last_name']} </p>"; # Create navigation links. echo '<p><a href="forum.php">Forum</a> | <a href="shop.php">Shop</a> | <a href="goodbye.php">Logout</a></p>'; # Display footer section. include ( 'includes/footer.html' ) ; ?> So well yes as you can see there is user_id, that wouldn't be related to this task of trying to get profile index of that registered username listed in that page with some code.
  14. I corrected that. Thanks. The files do work. I think I could still use the file I am using from the example files, the index only, the one from the easy book files is very basic, and was the first file I used a year back when I first watched a php 7 tutorial. The individual who went out of his way to get it to work, never responded to any further emails. He probably thought the code was still fine to use, or what ever, thought yeah make a tutorial series using out of date code. I imagine the code I am using which is from Mysql & php from the easy series is probably out of date, similar to what I got from php 7. But yes I sent a message via site for a Php 7 PDO user login system.
  15. If a connect_db is in a different folder, it should be /new/connect_db.php? I tried that, I couldn't get a register.php to work from the example files.
  16. Html

    Table has error

    I suggested to easysteps to create a book on PDO, php 7 and so on for a user system. Hopefully in time there will be one. The book series is nice, but I can't help but feel that may be just uploading all the code kind of defeats the purpose. But unfortunately some, they won't get anywhere without. There is other code available, so I think I'm sorted with something basic and old for the moment. I'm going to try some of the files, and if any problems I will be posting back for hints.
  17. Html

    Table has error

    The examples I use are from that rubbish youtube clip that now charges to use the files for anyone who wants a copy of them, the forum is from the php 7 book. I hope to use that as a comment system for a user profile, so you get my drift, use a bit of this, learn something, and get a result, doing anything further such as inbox feature for an account is another step isn't it. As for the code, it worked on paid, but didn't on the free. I don't have access to a php.ini file or what ever the the file is to edit email sending. Well then may be build a new register.php? How hard can this be, email pass, you know send off to a db, and then load into a profile page. 🤨
  18. Html

    Table has error

    Hmm, Now that I think of this, I recall tinkering with the php code of changing 0 to 1, as for the db may be, may be not now. That didn't solve the problem. Bare in mind, on the free host this system doesn't work, so even if that could solve the logging in problem once registered, the free host won't accept the register.php.
  19. Html

    Table has error

    Ah, so it isn't rubbish then, it was just me removing that, I removed it because I didn't have access to some kind of file to permit this sort of feature. Can you assist me with trying to get this to work as I have it then?
  20. Html

    Table has error

    Sure, that is what I mean, from index.php it then goes to register.php, on the free host it should then load to profile.php but it is just a blank page. It doesn't work, there are no error reports from register.php I included the error code in it. And yes I would like to use what I have, but get it working as it should, I can then include a comment box and may be try and use the code from the php 7 easy steps, so I use a bit of this and that. For the least I need to get this working on the free host, even I can't log back in, like it was on the paid host. The admins commented on the code looking dangerous whether it is or not, doesn't matter, it isn't a financial site or a shopping user site. I'm just trying to get something basic up and running, then be concerned about any security.
  21. Html

    Table has error

    <?php session_start(); /* Registration process, inserts user info into the database and sends account confirmation email message */ // Set session variables to be used on profile.php page $_SESSION['email'] = $_POST['email']; $_SESSION['first_name'] = $_POST['firstname']; $_SESSION['last_name'] = $_POST['lastname']; // Escape all $_POST variables to protect against SQL injections $first_name = $mysqli->escape_string($_POST['firstname']); $last_name = $mysqli->escape_string($_POST['lastname']); $email = $mysqli->escape_string($_POST['email']); $password = $mysqli->escape_string($_POST['password']); // Check if user with that email already exists $result = $mysqli->query("SELECT * FROM users WHERE email='$email'") or die($mysqli->error()); // We know user email exists if the rows returned are more than 0 if ( $result->num_rows > 0 ) { $_SESSION['message'] = 'User with this email already exists!'; header("location: error.php"); } else { // Email doesn't already exist in a database, proceed... // active is 0 by DEFAULT (no need to include it here) $sql = "INSERT INTO users (first_name, last_name, email, password) " . "VALUES ('$first_name','$last_name','$email','$password')"; // 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!"; mail( $to, $subject, $message_body ); header("location: profile.php"); } else { $_SESSION['message'] = 'Registration failed!'; header("location: error.php"); } } I can't imagine I'd of changed the code, since I know little about php. It does work to register and to load into profile, what doesn't work is to log back in after logging out. The code is out of date and so on, this has been stated here by yourselves. But yes it doesn't on the free host, so no registering details to the db, or any loading into a profile.php So I can only think of the host having a setup which doesn't permit this.
  22. Html

    Table has error

    I tried the error code on the register.php page, nothing occurs, and yes I am using a db.php for the examples files. I made sure to do so. The forum uses connect_db Well the title states php 7, so may be some of the code isn't php 7 I would guess now.
  23. Html

    Table has error

    Yes it does have a db.php Everything above works but only to register on the paid host and logged in once, you can't login again, just gives an error about no user being found, when the details are on the db, for what ever reason it wouldn't work on the free host, the admins on the support board stated there weeks back that the code looked dangerous. Now whether it is or not, I'm using what there is to achieve a task of registering a name, and logging in with an email and a pass, that is the object here. You've stated the example files are crap because they are out of date, but surely it can work. Well the author of the book is Mike Mcgrath Php 7 learn in easy steps which is where the forum code is from. How can it not be php 7? Even that sarcastic impatient user supplied me with the source files which I got the forum working. You are obviously referring to that? Having registered on the free host using the youtube files. register.php is what is in the link after index.php, after having registered. There is no report on the page, and no recorded info in the db. So every php environment is a little different, yet worked with the paid host to register and go from there to profile.php, and could log out. ini_set('display_errors', 1); error_reporting(E_ALL); I suspect the environment may be is blocking the code, because it is either poorly written or out of date. As with the paid, I guess anything goes since it was paid. Both the index page, and the forum use the same connect_db.php the difference is one posts to forum, and the other users.
  24. Html

    Table has error

    I had a hunch you may end up stating the example code from the php 7 easy steps was going to be wrong to use as a replacement. What we know is both code from the example files from the youtube channel are out of date, and now this code isn't workable as a replacement? This below needs PDO code. This doesn't work on the free host, how ever it worked on the paid host, it did send details to a db, and logged in a name, but doesn't work is logging in again, but that is because it doesn't have a session data or something like. I got no response from those two people I contacted, I just thought may be the code above could replace the problem I'm having on the free host if you see what I'm getting at. I'm sure, I'm getting nowhere, and in circles, nearly year ago when I first tried this php stuff via youtube. <?php /* Registration process, inserts user info into the database and sends account confirmation email message */ // Set session variables to be used on profile.php page $_SESSION['email'] = $_POST['email']; $_SESSION['first_name'] = $_POST['firstname']; $_SESSION['last_name'] = $_POST['lastname']; // Escape all $_POST variables to protect against SQL injections $first_name = $mysqli->escape_string($_POST['firstname']); $last_name = $mysqli->escape_string($_POST['lastname']); $email = $mysqli->escape_string($_POST['email']); $password = $mysqli->escape_string($_POST['password']); // Check if user with that email already exists $result = $mysqli->query("SELECT * FROM users WHERE email='$email'") or die($mysqli->error()); // We know user email exists if the rows returned are more than 0 if ( $result->num_rows > 0 ) { $_SESSION['message'] = 'User with this email already exists!'; header("location: error.php"); } else { // Email doesn't already exist in a database, proceed... // active is 0 by DEFAULT (no need to include it here) $sql = "INSERT INTO users (first_name, last_name, email, password) " . "VALUES ('$first_name','$last_name','$email','$password')"; // 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!"; mail( $to, $subject, $message_body ); header("location: profile.php"); } else { $_SESSION['message'] = 'Registration failed!'; header("location: error.php"); } }
  25. Html

    Table has error

    The error was solved, the code is from the book as is, but I've edited the three files not to have subject property. I thought I could use the process.php to replace register.php but that didn't work out. It is unfortunate the book didn't at least have that as a tutorial, would of been everything I need for now..until I could think what feature would be next for a user system. It can't be that difficult to get this working up. It is all to do with that PDO setup, unless somehow I can use the tutorial file to replace the register file. It needs work on it to make it work the same way as register, since you stated in the past that it was crap, and thirteen years too old. But it does work on the paid host, but not on the free host, since this example code does work, this is my best bet. <?php $page_title = 'PHP Process' ; include ( 'includes/header.html' ) ; function fail( $str ) { echo "<p>Please enter a $str.</p>"; echo '<p><a href="post.php">Post Message</a>' ; include ( 'includes/footer.html' ) ; exit(); } if( isset( $_POST[ 'message' ] ) ) { if ( !empty( trim( $_POST[ 'first_name' ] ) ) ) { $first_name = addslashes( $_POST[ 'first_name' ] ) ; } else { fail( 'First Name' ) ; } if ( !empty( trim( $_POST[ 'last_name' ] ) ) ) { $last_name = addslashes( $_POST[ 'last_name' ] ) ; } else { fail( 'Last Name' ) ; } if ( !empty( trim( $_POST[ 'email' ] ) ) ) { $subject = addslashes( $_POST[ 'email' ] ) ; } else { fail( 'email' ) ; } if ( !empty( trim( $_POST[ 'password' ] ) ) ) { $subject = addslashes( $_POST[ 'password' ] ) ; } else { fail( 'password' ) ; } require ( 'connect_db.php' ) ; $sql = "INSERT INTO users (first_name,last_name,email,password) VALUES ('$first_name', '$last_name', '$email', '$password' )" ; $result = mysqli_query( $dbc, $sql ) ; if (mysqli_affected_rows($dbc) != 1) { echo '<p>Error</p>'.mysqli_error($dbc); mysqli_close( $dbc ) ; } else { mysqli_close( $dbc ) ; header('Location: profile.php') ; } } So proces.php this is called. } if( isset( $_POST[ 'message' ] ) ) { I doubt that would be in a file for a replacement for register.
×
×
  • Create New...