PHP Classes

How can i make it work

Recommend this page to a friend!

      PHP Secure Login and Registration  >  PHP Secure Login and Registration package blog  >  Secure PHP Login Scri...  >  All threads  >  How can i make it work  >  (Un) Subscribe thread alerts  
Subject:How can i make it work
Summary:Thanks with feed back.
Messages:5
Author:juan m
Date:2017-04-26 17:46:09
 

  1. How can i make it work   Reply   Report abuse  
Picture of juan m juan m - 2017-04-26 17:46:09
I have a reallly minimun idea for how sql php works. I did download the files and drop them in to the root folder of a domain hosted in 1&1 (the only files that are in the root are the ones that i did download from herer. I did just edit the config file with the host db and user name.
When i do navigate to login or register when i do push submit the button does not respond. What im doing wrong? Thanks in advance.

  2. Re: How can i make it work   Reply   Report abuse  
Picture of juan m juan m - 2017-04-26 20:39:55 - In reply to message 1 from juan m
ok now it is better(the problem was that the require ../class path dint work them i did remove the ..? and it work. at least now index opens and the butons works....but when i do try to register it saids call to a member fucntion prepare() on null in ...host/class/users.php on line 255.

  3. Re: How can i make it work   Reply   Report abuse  
Picture of Frank Cauley Frank Cauley - 2017-09-15 16:37:34 - In reply to message 2 from juan m
I am getting the same result. I did use phpadmin to insert at least one user into the database but that did not help.

  4. Re: How can i make it work   Reply   Report abuse  
Picture of David E. Nuttall David E. Nuttall - 2017-09-29 13:08:56 - In reply to message 3 from Frank Cauley
Sounds like you need to open the "config.php" in the root directory and edit lines 3, 4 and 5, which follow the lines:
<?php
session_start();

In the original file, they look like this:
define('conString', 'mysql:host=localhost;dbname=login');
define('dbUser', 'root');
define('dbPass', 'root');

localhost is the name of your MySQL server. If you're actually operating on a machine on the internet, it probably will NOT be localhost.

dbname is the name of the database that you created, perhaps with MyPHPadmin

dbUser is the user name assigned to the database server and database.
dbPass is the password for that user.

Save the edited file and if saved off-line, copy it back to the root folder of your site.

Then refresh your browser and you should be able to register which will create data in the table in the database and send a verification email to whatever email address you used.

HTH.
Post a reply here and hopefully I'll get notified of the reply.
HOWEVER, I am NOT the author and do know speak for or represent the author who may have a different opinion on the foregoing!

Dave
San Antonio, Texas

  5. Re: How can i make it work   Reply   Report abuse  
Picture of Arild Grebstad Arild Grebstad - 2017-11-12 02:57:18 - In reply to message 4 from David E. Nuttall
When trying to register a user, I get the following alert text:
Fatal Error: Call to a member function prepare() on null in {myPath}/class/user.php on line 255

@Dave I already did what you suggested. Still got an error.

Could the creator of this script please lend a hand?