Home / Scripts & Code / PHP Scripts / Login
phpRegister - PHP Login And User Management ScriptphpRegister - PHP Login And User Management Script
phpRegister, User Login and Helpdesk Management procedural Script Average rating of 5.0 based on 1 votesHome / Scripts & Code / PHP Scripts / Login
phpRegister - PHP Login And User Management Script
phpRegister, User Login and Helpdesk Management procedural Script Average rating of 5.03 Support questions or comments
Please login or create an account to post a question or comment.
-
Jun 8, 2017Simon6 PurchasedHello again. Is there a built-in way to make mySQL queries, or do I need to build my own functions for that?
Thanks -
Jun 8, 2017VincentM AuthorHello,
There is no buit-in way to make MySQL queries.
To prevent SQL injections all sql queries uses PDO statements.
Example with getting firstname and lastname from the connected user, $_SESSION['user_id'] :
$dataBase = database__driverPDO();
$sql = $dataBase->prepare('SELECT firstname, lastname
FROM pr__user
WHERE id = :id';
$sql->execute(array('id' => decrypt($_SESSION['user_id'], $config['KeySessionID'])));
$user = $sql->fetch();
$sql->closeCursor();
Then to display firstname / lastname:
echo $user['firstname'];
echo $user['lastname'];
You will find examples of SELECT with LEFT JOIN, UPDATE and INSERT sql queries with PDO statements in the phpRegister script pages.
Regards,
Vincent. -
Jun 12, 2017Simon6 PurchasedPerfect, that's exactly what I was looking for - thanks a lot!
Simon
-
Jun 4, 2017Simon6 PurchasedThat's great.
I've been playing around with the script and I really like it - it is really easy to use - thanks again.
I have another question though.
I have a strange problem - when I go to https://www.mysite.com/account/details/ everything works ok. When I click on 'User Support' I am taken to the ticket page no problem. However, now when I click back to 'Details' the page goes to http://www.mysite.com/account/details/ (HTTP instead of HTTPS) and I get a few errors in console:
Access to Font at 'https://www.mysite.com/include/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://www.mysite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.mysite.com' is therefore not allowed access.
Do you know why this might be happening?
Sorry for all the questions! -
Jun 4, 2017VincentM AuthorThat's strange, the links are generated with the global variable $config['URL'].
Links of Details from Account part are displayed from the function show__accountTop() in the file account_display.inc.php.
<a href="'.$config['URL'].'/account/details">'.LANG_Global_Details.'</a>
Can you edit this function to show the result of this variable:
Add at the end show__accountTop() :
echo $config['URL'].'/account/details'; -
Jun 4, 2017Simon6 PurchasedThanks. I have added that line and the correct address is being outputted (with HTTPS) - the URL within the link is correct - however for some reason when I click on the link I am taken to the HTTP page.
I see it doesn't happen on your demo so must be something I have done wrong - I'll have a look through the code and let you know if I figure it out. -
Jun 4, 2017Simon6 PurchasedI use CloudFlare and it looks like CloudFlare is giving a 301 redirect for that page. I'm not sure why but I'm sure I'll figure it out. Thanks again.
-
Jun 4, 2017Simon6 PurchasedHello,
I am having trouble getting this setup - when I create the test-email.php file I get this error:
Notice: Use of undefined constant _PATHROOT - assumed '_PATHROOT' in /home/xxxxxxx/public_html/include/php/emails/email_global_send.php on line 9
- View 4 more replies
-
Jun 4, 2017VincentM AuthorTwitter OAuth has not been added because people having a twitter account have generally a facebook account as well.
I have found a good example of Twiiter OAuth here:
https://stackoverflow.com/questions/6550337/twitter-oauth-php-need-good-basic-example-to-get-started (zoomi reply)
Twitter should be added and will be available on next release.
-
Jun 4, 2017Simon6 PurchasedThanks a lot.
This script looks really great - thanks for creating it.
Just back to the _PATHROOT query. When I installed phpRegsiter I followed the configuration steps as setout in the documentation, including copying and pasting the code for email-test.php - did I miss something along the way not to know that I had to add the _PATHROOT constant to the file as well? I've gone back over the instructions and by following them step by step we aren't told about _PATHROOT.
No problem as I now understand it - but might be worth updating the instructions for future users.
Thanks again. -
Jun 4, 2017VincentM AuthorThank you I appreciate your comments.
I have updated the documentation on the creation of the test-email.php file.
https://phpregister.com/notice/oauth-script-configuration/#config_smtp.inc.php
And also about the email options:
https://phpregister.com/notice/php-js-css-files-structure/#Sendemail
Information
Category | Scripts & Code / PHP Scripts / Login |
First release | 2 June 2017 |
Last update | 4 July 2017 |
Software version | PHP 7.0, PHP 7.1, PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6 |
Files included | .php, .css, .sql, Javascript .js |
Tags | login, user management, administration, help desk, tickets |