PHP/MySQL Login server example on site not working

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hiya,


    To preface . . .I'm not a PHP or MySql guy so please forgive any ignorance :|.

    I downloaded this tutorial from the advanced section of clickteam's website and I can't seem to get it to work:

    Please login to see this attachment.


    It comes with a guide that, at points, just says "Fill stuff out its self explanatory."

    It also comes with a php fle that seems to contain the code for logging in, registering, etc.

    I've changed the information in the php file to match what I have on my end and uploaded it to my webhost


    Please login to see this attachment.

    I grabbed the service line from the hostname variable in my php control panel

    The username is displayed in my hosts main control panel for that specific database

    I've verified the password is correct for that username

    The table in the database is named "Users"

    As you can see here my database name matches.


    Please login to see this attachment.

    I've also created a table named "Users" that matches what is in the example file

    I've also made sure to include "Please login to see this link.." at the beginning of the Get URL because I found posts where people had issues by startign with the domain name instead of www.

    Please login to see this attachment.


    The odd thing is that the GET object refuses to throw errors. When attempting to register the "register" button re-enables itself so I know this line of code is executing, but the string that should show the error is completely blank.

    // Again, if the lowecase version of the first seven characters is not "success":
    // Then it failed so show the error and re-enable the button so the user can retry. Errors can be "Username taken" or "Email taken"

    * Get object: On get complete
    + Lower$(Left$(Received$( "Get object" ), 7)) <> "success"
    Error Message : Set alterable string to Received$( "Get object" )
    createAccount : Enable

    With no error checking I can't even attempt to troubleshoot. There is another login/register server example in the click store for $9.99 which looks a lot more fleshed out, but I can't purchase it because the click store is permanently down.

    Any help is greatly appreciated.

    Also can someone explain the get object to me?


    Get object : Add POST data "task" = "register"
    Get object : Add POST data "user" = Edittext$( "username" )
    Get object : Add POST data "pass" = Edittext$( "password" )
    Get object : Add POST data "email" = Edittext$( "email" )
    Get object : Get URL "Please login to see this link."
    createAccount : Disable

    POST data is data we are sending to the server correct? So this is just sending information to the php script and then the php script takes that data, places it into variables, and executes on it correct?

    Thanks!

  • The issue seems to be with the PHP code and not the program itself.

    I've moved to a better host and i'm getting errors related to PHP code being deprecated due to the php script in the tutorial being bad

    Tips and hints appreciated as always. Will update when I have a resolution :)

  • That tutorial was written for an old version of PHP and does not work with the newer version that your server is likely running.

    I updated the example myself several months ago to use MySQLi calls instead of the now unsupported mysql_ function calls. As long as the MySQLi module is enabled on your server it should work fine with PHP 7 and up. The included PDF is the same, but the relevant changes and what you need to do because of them are mentioned in the included text file.

    On the topic of error logs, those should be dumped into a log file that will be in the same directory as the .php file that had the error on your server. You should be able to see it by accessing your server with FTP.


    Try using the updated php script I attached to this post, just remember to add all your information to it again before uploading it to your server. Also be sure to give the "update notes.txt" file a read since it documents the changes I made, which included adding a new variable field.

  • On a second note, do you happen to know how the validation works? I can't seem to get it to work. I receive the validation email and a link is generated, but upon clicking the link I get a blank page, which is kind of expect since I don't have anything added to the website, but the validation number doesn't change from 0 to 1

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!