Hello all,
I have a potential client who wants to have a single .php page on our project that is password-protected, such that only about 5 people (who we have given a password to) can log-on and see this page.
How can I do this with the Form/or Login tools with WB?
How do I protect 1 .php page on a project behind a password?
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
How do I protect 1 .php page on a project behind a password?
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Re: How do I protect 1 .php page on a project behind a password?
I am trying to use the "Login" object, within my WYSIWYG Web Builder .WBS file right now, and I have gone into its "Properties" and chosen that I would like to use the MySQL method to have users, but when I am at the point where I need to fill in
MySQL Database Name
MySQL Password
MySQL Server
MySQL Table Name
MySQL Username
I filled out all of them except for MySQL Table Name, because, when I created a new MySQL Database from within my Web-Host, it gave me all of these details. But, I do not know what to fill in for "Table". Do I just need to go to phpmyadmin from my host, and create a table that way?
Because, when I click the "Create Database" button, from within the "Login" Object Properties within my WYSIWYG Web Builder software, and the dialogue box says, "Please use the following SQL statement to create the MySQL table on the server", and then has this code:
Am I supposed to be putting some sort of name in-between the two " ' " marks on the SQL statement? And then whatever I put as the name there, go back over to that "MySQL Table Name" field from within the Login Object Properties and put that same table name there?
MySQL Database Name
MySQL Password
MySQL Server
MySQL Table Name
MySQL Username
I filled out all of them except for MySQL Table Name, because, when I created a new MySQL Database from within my Web-Host, it gave me all of these details. But, I do not know what to fill in for "Table". Do I just need to go to phpmyadmin from my host, and create a table that way?
Because, when I click the "Create Database" button, from within the "Login" Object Properties within my WYSIWYG Web Builder software, and the dialogue box says, "Please use the following SQL statement to create the MySQL table on the server", and then has this code:
whenever I go to the phpmyadmin in my MySQL Database from within my web-host, and I clicked "SQL" at the top of that page, and I pasted the code into that first text-box, and then clicked the "Go" button, it seems like phpmyadmin gave me this error:CREATE TABLE `` (
`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 know I am doing something wrong, but, I just don't know what. Just trying to fill in what I need to fill in and follow instructions correctly.Error
SQL query:
CREATE TABLE `` (
`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`))
MySQL said: Documentation
#1103 - Incorrect table name ''
Am I supposed to be putting some sort of name in-between the two " ' " marks on the SQL statement? And then whatever I put as the name there, go back over to that "MySQL Table Name" field from within the Login Object Properties and put that same table name there?
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Re: How do I protect 1 .php page on a project behind a password?
Ok, so, update, I did this thing:
table
so I put that in the SQL statement, in between the two ' marks, and it seemed to create the table. And then, on "MySQL Table Name", I also put the exact same string
table
So, I'm guessing, if I publish this, that's all well and good.
But, now, how do I actually edit peoples' usernames? I did what the Help topic said, where I created a new table called "USERS", by copying/pasting this:
Because, I tried doing that, and just filled in a made-up username, and made-up full name, a password, and an e-mail address; so I filled in those four strings, and clicked "Go" in phpmyadmin . And it shows me as a record, there, in the table. But, when I then go to my live-active WB-page where I put the "Login" object an attempt to use this username and password, it doesn't work. Now, I left all of the "FUNCTIONS" fields, empty, on each of these four fields I filled-in to create this test-record to try a login. Do I need to set the "FUNCTIONS" to something, on these username, full name, password, e-mail fields?
and I just called itAm I supposed to be putting some sort of name in-between the two " ' " marks on the SQL statement? And then whatever I put as the name there, go back over to that "MySQL Table Name" field from within the Login Object Properties and put that same table name there?
table
so I put that in the SQL statement, in between the two ' marks, and it seemed to create the table. And then, on "MySQL Table Name", I also put the exact same string
table
So, I'm guessing, if I publish this, that's all well and good.
But, now, how do I actually edit peoples' usernames? I did what the Help topic said, where I created a new table called "USERS", by copying/pasting this:
into my SQL, within phpmyadmin, and it seemed to have created that "USERS" table! But, I mean, so do I use the "Insert" link, in phpmyadmin, and just fill things out that way, each time we want to add a user?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`));
Because, I tried doing that, and just filled in a made-up username, and made-up full name, a password, and an e-mail address; so I filled in those four strings, and clicked "Go" in phpmyadmin . And it shows me as a record, there, in the table. But, when I then go to my live-active WB-page where I put the "Login" object an attempt to use this username and password, it doesn't work. Now, I left all of the "FUNCTIONS" fields, empty, on each of these four fields I filled-in to create this test-record to try a login. Do I need to set the "FUNCTIONS" to something, on these username, full name, password, e-mail fields?
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Re: How do I protect 1 .php page on a project behind a password?
The default value is 'USERS'But, I do not know what to fill in for "Table".
If you do not enter a value then the SQL query will not be valid.
You can use the Admin tool to create users.But, now, how do I actually edit peoples' usernames?
See this related tutorial:
http://www.wysiwygwebbuilder.com/login_basics.html
Re: How do I protect 1 .php page on a project behind a password?
I can use the admin tool even though I used MySQL for this one? I thought that page and the help topics all seemed to be saying that the admin tool is only for use with the flat-file method?
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Re: How do I protect 1 .php page on a project behind a password?
Here are some screens to illustrate what seems to be happening for me, right now:
https://www.ktravisj.com/ipstest/scrn1.png
And when you go here:
https://www.ktravisj.com/ipstest/index.php
and try those logins, it doesn't work.
https://www.ktravisj.com/ipstest/scrn1.png
And when you go here:
https://www.ktravisj.com/ipstest/index.php
and try those logins, it doesn't work.
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Travis J Consulting, LLC
⚫️Website Design/Development/Maintenance
⚫️Web-Marketing/Social Media
⚫️SEO/Search Engine Optimization
https://ktravisj.com
Re: How do I protect 1 .php page on a project behind a password?
YesI can use the admin tool even though I used MySQL for this one?
The admin tool is for both MySQL and flat file.I thought that page and the help topics all seemed to be saying that the admin tool is only for use with the flat-file method?
You cannot manually edit the database because the password is hashed. You will need to use the admin tool to create users.