Difficulties accessing and configuring the database
Difficulties accessing and configuring the database
Je suis désolé de poser des questions basiques mais je n'arrive pas à trouver le bon paramétrage pour identifier ma base de données.
Il y a plus de 35 ans je faisais le même travail facilement sous DOS sur les base de données avec dBase III+ et son compilateur Nantucket Clipper, mais là j'ai besoin d'aide.
Après avoir créé une base de données exemple "test" ainsi qu'une table "users" avec Create Database et My SQL je n'arrive pas à trouver le bon paramétrage pour identifier ma base de données.
Ou trouver une vidéo qui montre la saisie des informations de la base de données pas en CSV mais avec SQL dans PHP MyAdmin en exemple ? Merci
I'm sorry to ask basic questions but I can't find the right setting to identify my database.
More than 35 years ago I did the same job easily under DOS on databases with dBase III+ and its Nantucket Clipper compiler, but now I need help.
After creating a sample "test" database and a "users" table with Create Database and My SQL I can't find the right setting to identify my database.
Where can I find a video that shows the entry of database information not in CSV but with SQL in PHP MyAdmin as an example? Thanks
Il y a plus de 35 ans je faisais le même travail facilement sous DOS sur les base de données avec dBase III+ et son compilateur Nantucket Clipper, mais là j'ai besoin d'aide.
Après avoir créé une base de données exemple "test" ainsi qu'une table "users" avec Create Database et My SQL je n'arrive pas à trouver le bon paramétrage pour identifier ma base de données.
Ou trouver une vidéo qui montre la saisie des informations de la base de données pas en CSV mais avec SQL dans PHP MyAdmin en exemple ? Merci
I'm sorry to ask basic questions but I can't find the right setting to identify my database.
More than 35 years ago I did the same job easily under DOS on databases with dBase III+ and its Nantucket Clipper compiler, but now I need help.
After creating a sample "test" database and a "users" table with Create Database and My SQL I can't find the right setting to identify my database.
Where can I find a video that shows the entry of database information not in CSV but with SQL in PHP MyAdmin as an example? Thanks
Re: Difficulties accessing and configuring the database
I have no experience with this part of WWB.
But in MySQL you create the database in your hosting admin panel, you then create a username for it there, and link that username (with it's password) to the database. The information you have entered to set it up is required by WWB I think.
But in MySQL you create the database in your hosting admin panel, you then create a username for it there, and link that username (with it's password) to the database. The information you have entered to set it up is required by WWB I think.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->
Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
Re: Difficulties accessing and configuring the database
Je précise que je suis sur le serveur local avec xampp.
La base de données est crée
La table est généré par le code sql de wysiwyg web builder
Mais je n'arrive pas à indiquer les bonnes informations dans le panneau admin
Please specify that you are on the local server with xampp.
La base de données est crée La table est généré par le code sql de wysiwyg web builder Mais je n'arrive pas à indicar les bonnes informations dans le panneau admin J'ai en retour:...
"c:\xampp\htdocs\test"
Database : MySQL
MySQL : database test
Password : 1234
Serveur : localhost
Table name : users
La base de données est crée
La table est généré par le code sql de wysiwyg web builder
Mais je n'arrive pas à indiquer les bonnes informations dans le panneau admin
Please specify that you are on the local server with xampp.
La base de données est crée La table est généré par le code sql de wysiwyg web builder Mais je n'arrive pas à indicar les bonnes informations dans le panneau admin J'ai en retour:...
"c:\xampp\htdocs\test"
Database : MySQL
MySQL : database test
Password : 1234
Serveur : localhost
Table name : users
'.mysqli_error($db)); } mysqli_select_db($db, $mysql_database) or die('Failed to select database
'.mysqli_error($db)); mysqli_set_charset($db, 'utf8'); mysqli_query($db, 'SET NAMES "UTF8"'); mysqli_query($db, "SET collation_connection='utf8_general_ci'"); mysqli_query($db, "SET collation_server='utf8_general_ci'"); mysqli_query($db, "SET character_set_client='utf8'"); mysqli_query($db, "SET character_set_connection='utf8'"); mysqli_query($db, "SET character_set_results='utf8'"); mysqli_query($db, "SET character_set_server='utf8'"); if (!empty($action)) { if ($action == 'delete') { $sql = "DELETE FROM ".$mysql_table." WHERE `username` = '$id'"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'update') { $sql = "UPDATE `".$mysql_table."` SET `username` = '$username', "; if (!empty($_POST['password'])) { $crypt_pass = md5($_POST['password']); $sql = $sql . "`password` = '$crypt_pass',"; } $sql = $sql . " `fullname` = '$fullname', `email` = '$email', `role` = '$role', `active` = $active WHERE `username` = '$id'"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'create') { $sql = "SELECT username FROM ".$mysql_table." WHERE username = '".$_POST['username']."'"; $result = mysqli_query($db, $sql); if ($data = mysqli_fetch_array($result)) { echo 'User already exists!'; exit; } $crypt_pass = md5($_POST['password']); $sql = "INSERT `".$mysql_table."` (`username`, `password`, `fullname`, `email`, `role`, `active`) VALUES ('$username', '$crypt_pass', '$fullname', '$email', '$role', $active)"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'logout') { session_unset(); session_destroy(); setcookie('admin_password', '', time() - 3600); header('Location: '.basename(__FILE__)); exit; } } ?> \n"; echo "
Last edited by jolijojo on Sun Sep 15, 2024 3:19 am, edited 1 time in total.
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
MySQL Server should not have been "test" but Server should have been "localhost" according to you first posts screenshot if I suggest.
Another thing is that you have written username as "admin" but as I use XAMPP myself every day I think you might have configured the configuration wrong somehow. Try using Username as "root" and usually there is no password unless configured. See how it works and let us know.
Another thing is that you have written username as "admin" but as I use XAMPP myself every day I think you might have configured the configuration wrong somehow. Try using Username as "root" and usually there is no password unless configured. See how it works and let us know.
Re: Difficulties accessing and configuring the database
I removed the password and the table.
database name : test
password :
server : localhost
table name : users
database name : test
password :
server : localhost
table name : users
re-create the new table by SQL in the test databaseCREATE TABLE `users` (
`id` int(10) NOT NULL auto_increment,
`username` varchar(50) NOT NULL,
`fullname` varchar(75) NOT NULL,
`password` varchar(50) NOT NULL,
`email` varchar(75) NOT NULL,
`active` tinyint(1) NOT NULL,
`code` varchar(75),
`role` varchar(50),
`avatar` varchar(50),
PRIMARY KEY (`id`));
I wonder: is there not a path problem to access the phpmyadmin..."test" database ?'.mysqli_error($db)); } mysqli_select_db($db, $mysql_database) or die('Failed to select database
'.mysqli_error($db)); mysqli_set_charset($db, 'utf8'); mysqli_query($db, 'SET NAMES "UTF8"'); mysqli_query($db, "SET collation_connection='utf8_general_ci'"); mysqli_query($db, "SET collation_server='utf8_general_ci'"); mysqli_query($db, "SET character_set_client='utf8'"); mysqli_query($db, "SET character_set_connection='utf8'"); mysqli_query($db, "SET character_set_results='utf8'"); mysqli_query($db, "SET character_set_server='utf8'"); if (!empty($action)) { if ($action == 'delete') { $sql = "DELETE FROM ".$mysql_table." WHERE `username` = '$id'"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'update') { $sql = "UPDATE `".$mysql_table."` SET `username` = '$username', "; if (!empty($_POST['password'])) { $crypt_pass = md5($_POST['password']); $sql = $sql . "`password` = '$crypt_pass',"; } $sql = $sql . " `fullname` = '$fullname', `email` = '$email', `role` = '$role', `active` = $active WHERE `username` = '$id'"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'create') { $sql = "SELECT username FROM ".$mysql_table." WHERE username = '".$_POST['username']."'"; $result = mysqli_query($db, $sql); if ($data = mysqli_fetch_array($result)) { echo 'User already exists!'; exit; } $crypt_pass = md5($_POST['password']); $sql = "INSERT `".$mysql_table."` (`username`, `password`, `fullname`, `email`, `role`, `active`) VALUES ('$username', '$crypt_pass', '$fullname', '$email', '$role', $active)"; mysqli_query($db, $sql); mysqli_close($db); header('Location: '.basename(__FILE__)); exit; } else if ($action == 'logout') { session_unset(); session_destroy(); setcookie('admin_password', '', time() - 3600); header('Location: '.basename(__FILE__)); exit; } } ?> \n"; echo "
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
Please provide a demo of your .wbs project so we can figure out what may be the issue.
How to share the project read on the link below
viewtopic.php?f=10&t=82134
How to share the project read on the link below
viewtopic.php?f=10&t=82134
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
Your error suggests that it failed to select the database. I used your own sql and was able to successfully create the table on my own XAMPP database. You first have to make sure that the database exists and the table is generated using sql automatically.jolijojo wrote: ↑Sun Sep 15, 2024 5:37 am I removed the password and the table.
database name : test
password :
server : localhost
table name : users
CREATE TABLE `users` (
`id` int(10) NOT NULL auto_increment,
`username` varchar(50) NOT NULL,
`fullname` varchar(75) NOT NULL,
`password` varchar(50) NOT NULL,
`email` varchar(75) NOT NULL,
`active` tinyint(1) NOT NULL,
`code` varchar(75),
`role` varchar(50),
`avatar` varchar(50),
PRIMARY KEY (`id`));
re-create the new table by SQL in the test database
'.mysqli_error($db)); } mysqli_select_db($db, $mysql_database) or die('Failed to select database
for the phpmyadmin and select or create the DATABASE named "test" first then click on it then click on SQL and then click on "Go"
or you can use this sql
Code: Select all
-- Create the database if it does not exist
CREATE DATABASE IF NOT EXISTS test;
-- Use the database
USE test;
-- Create the users table if it does not exist
CREATE TABLE IF NOT EXISTS users (
id INT(10) NOT NULL AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
fullname VARCHAR(75) NOT NULL,
password VARCHAR(50) NOT NULL,
email VARCHAR(75) NOT NULL,
active TINYINT(1) NOT NULL,
code VARCHAR(75),
role VARCHAR(50),
avatar VARCHAR(50),
PRIMARY KEY (id)
);
Re: Difficulties accessing and configuring the database
After deleting the database and its table, I copied the code into sql.
The test database and the table are indeed existing.
But still no connection possible.
The test database and the table are indeed existing.
But still no connection possible.
Re: Difficulties accessing and configuring the database
Actually I'm copying this video: https://youtu.be/XCh7acSwXng?si=fxv5BXaoL5kRdiS1 with database on Phpmyadmin
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
What you see is what you get. May have some misconfigurations or mistaken some steps on following the video instructions. if you did not get what you had seen then what you should present is a demo project so we can see the issue. The login tool works perfect from my confirmation as a user.
When providing demo projects make sure there is no confidential information like id passwords or other stuffs.
When providing demo projects make sure there is no confidential information like id passwords or other stuffs.
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
I already tested your login tool I did not change anything just went to my xampp and created the users table and I can 100% confirm your code works for me. But I had to create the index page that is something missing for sure. So must have been database issue now I cannot look into your database to check for issue. maybe there are php error reports which you can show if they come?
What you forgot to do was you did not create the index page which is obligatory. You must have the index page. The index page is like the home page where you show people where the login buttons are and the sign-up buttons which would direct them to those pages. Or else how would they even go to the login page.
What you forgot to do was you did not create the index page which is obligatory. You must have the index page. The index page is like the home page where you show people where the login buttons are and the sign-up buttons which would direct them to those pages. Or else how would they even go to the login page.
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
I see you have the database and the table created.
if you are testing on xammp make sure you have both Apache and MySQL "STARTED"
Now..
1. did you have the index page when the website loads it first loads the home page meaning the index page. As previously mentioned, you did not create it so do that. There you should have buttons 2 buttons for example purpose one links to login page other links to register page.
2. As site will load the index page you don't click to login but register first as there are no new users, so you write username and password and some dummy data to open the account.
3. After that it may tell you to verify as you have not configured the email verification part, we will do it from admin.php page you have it already but did not write password so make sure you write password on your admin.php page after that.
So when you register the account then go to admin.php page login ad instead of "pending" put it to "active" on the account which you just created.
4. Then go to login page and you can now use the username and pass to login to the restricted page.
also don't forget to create the logout method.
If you are new to xampp the url of example should be like, below make sure you have all your websites file inside that folder. the project folder and that project folder must be inside the htdocs folder which you will find on xampp's directory.
http://localhost/project/
when you write that if you have all the files in that project folder the browser should load your website with the index page first the rest of the stuffs are based on your understanding and expertise.
if you are testing on xammp make sure you have both Apache and MySQL "STARTED"
Now..
1. did you have the index page when the website loads it first loads the home page meaning the index page. As previously mentioned, you did not create it so do that. There you should have buttons 2 buttons for example purpose one links to login page other links to register page.
2. As site will load the index page you don't click to login but register first as there are no new users, so you write username and password and some dummy data to open the account.
3. After that it may tell you to verify as you have not configured the email verification part, we will do it from admin.php page you have it already but did not write password so make sure you write password on your admin.php page after that.
So when you register the account then go to admin.php page login ad instead of "pending" put it to "active" on the account which you just created.
4. Then go to login page and you can now use the username and pass to login to the restricted page.
also don't forget to create the logout method.
If you are new to xampp the url of example should be like, below make sure you have all your websites file inside that folder. the project folder and that project folder must be inside the htdocs folder which you will find on xampp's directory.
http://localhost/project/
when you write that if you have all the files in that project folder the browser should load your website with the index page first the rest of the stuffs are based on your understanding and expertise.
- BaconFries
-
- Posts: 5640
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Difficulties accessing and configuring the database
What is it you don't understand? If you are wishing to have a login then it needs to be placed in a HTML/PHP page how else will your users be able to sign in! I think you need to slow down and read the following urls in how to use up a database and using the login tools along with the demo
How to create a user database for the login tools?
Adding a login to your web site
Getting started with the Login Tools
How to create a user database for the login tools?
Adding a login to your web site
Getting started with the Login Tools
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
I did not say change login.php into index.php instead I said index.php is a separate page
Re: Difficulties accessing and configuring the database
Merci de votre aide et de votre patience, j'ai crée index.php avec le link des boutons sur login et register : idem
Après j'ai ajouté le nom d'admin avec un mot de passe et crée dans 1 enregistrement avec ces information idem.
Je n'arrive pas à comprendre d'où vient mon erreur.
Créer une base de données avec une table ce n'est pas difficile pourtant.
Cela fait pas mal de temps que j'avais essayé sans réussir, à la différence que maintenant je dois trouver la solution.
Il y a quelques vidéos avec la traduction possible sauf celles en espagnol qui sont sans traduction.
J'ai crée quelques sites vitrines comme j'ai pu et toujours acheté les mise à jours, cette fois c'est pour ma fille.
Thank you for your help and patience, I created index.php with the link of the buttons on login and register: idem
After I added the name of admin with a password and created in 1 record with this information idem.
I can't understand where my error comes from.
Creating a database with a table is not difficult though.
It's been a while since I tried without success, except that now I have to find the solution.
There are some videos with the possible translation except those in Spanish which are without translation.
I created some showcase sites as I could and always bought the updates, this time it's for my daughter.
Thank you google
Après j'ai ajouté le nom d'admin avec un mot de passe et crée dans 1 enregistrement avec ces information idem.
Je n'arrive pas à comprendre d'où vient mon erreur.
Créer une base de données avec une table ce n'est pas difficile pourtant.
Cela fait pas mal de temps que j'avais essayé sans réussir, à la différence que maintenant je dois trouver la solution.
Il y a quelques vidéos avec la traduction possible sauf celles en espagnol qui sont sans traduction.
J'ai crée quelques sites vitrines comme j'ai pu et toujours acheté les mise à jours, cette fois c'est pour ma fille.
Thank you for your help and patience, I created index.php with the link of the buttons on login and register: idem
After I added the name of admin with a password and created in 1 record with this information idem.
I can't understand where my error comes from.
Creating a database with a table is not difficult though.
It's been a while since I tried without success, except that now I have to find the solution.
There are some videos with the possible translation except those in Spanish which are without translation.
I created some showcase sites as I could and always bought the updates, this time it's for my daughter.
Thank you google
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
I do not understand how that error comes on your page's top place. All your pages are php which is fine. Maybe it is an xampp configuration issue. Check what @baconfries has provided as see if it resolves.
But..
Have you tried clearing browser cache?
Have you tried uploading it on a real server and check it out on the real webserver?
But..
Have you tried clearing browser cache?
Have you tried uploading it on a real server and check it out on the real webserver?
- BaconFries
-
- Posts: 5640
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Difficulties accessing and configuring the database
There is a fully working "Demo" template you could try installing to xampp or to your own host/server it is mentioned at the following url. The Demo includes a signup, admin, login etc by trying this it should show it you have xampp properly configured and if you are still having issues even with the demo then it is as mentioned a configuration issue.
https://www.wysiwygwebbuilder.com/login_tools.html
https://www.wysiwygwebbuilder.com/login_tools.html
Re: Difficulties accessing and configuring the database
I don't want to work on the server of the real site but on xampp.
delete xampp
install Xampp 8 1
activate Apache and MySQL
download the wbs file "LOGIN"
save in the corresponding folder "logindemo"
Configure the publication file
Create a database "usersdb"
Return to wysiwyg
Database: MySQL
Database name "usersdb"
Password 12345
Server: localhost
Table name: "utilisateurs"
Username admin
Copy paste from Create Database
Create the table "users" in PHPmyadmin by SQL
delete xampp
install Xampp 8 1
activate Apache and MySQL
download the wbs file "LOGIN"
save in the corresponding folder "logindemo"
Configure the publication file
Create a database "usersdb"
Return to wysiwyg
Database: MySQL
Database name "usersdb"
Password 12345
Server: localhost
Table name: "utilisateurs"
Username admin
Copy paste from Create Database
Create the table "users" in PHPmyadmin by SQL
-
-
- Posts: 1439
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: Difficulties accessing and configuring the database
The reason why we said to test it on a web server was to confirm if there was any issue with the configuration. To be double sure that there may have been misconfiguration on the XAMPP config which you may not have set properly.
What the web host server could do is they have settings well configured so it would be easier to understand. Now on my side it works fine so I was thinking on your side.
What the web host server could do is they have settings well configured so it would be easier to understand. Now on my side it works fine so I was thinking on your side.
Re: Difficulties accessing and configuring the database
As soon as possible I will try on hosting.
It's been a long time since I did tests on xampp.
Disappointed not to be able to have the same results with the demo version.
I will come back to the subject, in the meantime I appreciate your help.
Have a good day.
Jean-Pierre
It's been a long time since I did tests on xampp.
Disappointed not to be able to have the same results with the demo version.
I will come back to the subject, in the meantime I appreciate your help.
Have a good day.
Jean-Pierre