Go Back   Serif Software Forums > Design and Publishing > WebPlus

Notices

WebPlus Questions about using WebPlus for website design

 
 
Thread Tools Display Modes
Old 26th September 2009, 10:21 PM   #21
Martin Taylor
Expert
 
Martin Taylor's Avatar
 
Join Date: Feb 2009
Location: East Herts, UK
Posts: 5,868
Martin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant future
Default Re: Client Login for a newbie

Quote:
Originally Posted by sprytee View Post
*headscratch* What is PHP? Oh I am a newbie at this! Thanks in advance!!
OK - before we go any further and I get into step-by-step instructions, can you check that your web hosting includes the use of PHP?

PHP is a scripting language that operates on the web server before the pages are sent to the browser. It's available on most web hosting packages, but you need to make sure.

Where is your hosting? And what level of account do you have? Some hosts have levels like "Bronze", "Silver", "Gold" where maybe the lowest level doesn't have PHP available.
__________________
Martin
Martin Taylor is offline  
Old 27th September 2009, 10:16 AM   #22
Martin Taylor
Expert
 
Martin Taylor's Avatar
 
Join Date: Feb 2009
Location: East Herts, UK
Posts: 5,868
Martin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant future
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
OK - before we go any further and I get into step-by-step instructions ...
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
__________________
Martin
Martin Taylor is offline  
Old 27th September 2009, 01:15 PM   #23
sprytee
New Member
 
Join Date: Sep 2009
Posts: 13
sprytee is on a distinguished road
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
OK - before we go any further and I get into step-by-step instructions, can you check that your web hosting includes the use of PHP?

PHP is a scripting language that operates on the web server before the pages are sent to the browser. It's available on most web hosting packages, but you need to make sure.

Where is your hosting? And what level of account do you have? Some hosts have levels like "Bronze", "Silver", "Gold" where maybe the lowest level doesn't have PHP available.
I checked...I have POWWEB and it says it includes PHP.
sprytee is offline  
Old 8th October 2009, 01:17 PM   #24
MartinP
New Member
 
Join Date: Oct 2009
Posts: 8
MartinP is on a distinguished road
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
Sorry maybe missed something but how do you do the first bit in the editor 'Open that page in the editor - WP will display the code editor' where is the editor in WP (if it is in WP)?

Thanks for all the help so far.
MartinP is offline  
Old 8th October 2009, 03:15 PM   #25
Martin Taylor
Expert
 
Martin Taylor's Avatar
 
Join Date: Feb 2009
Location: East Herts, UK
Posts: 5,868
Martin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant future
Default Re: Client Login for a newbie

Quote:
Originally Posted by MartinP View Post
Sorry maybe missed something but how do you do the first bit in the editor 'Open that page in the editor - WP will display the code editor' where is the editor in WP (if it is in WP)?
Assuming that you can see the page in the Site Structure tab over to the right, then just double-click it. Because it was created as an HTML Page, it goes straight to WP's code editor, rather than to the wysiwyg editor. You'll see a heap of default HTML code that can be deleted.
__________________
Martin
Martin Taylor is offline  
Old 23rd July 2011, 04:32 PM   #26
webuxer
Regular Member
 
Join Date: Jun 2011
Posts: 148
webuxer is on a distinguished road
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
OK - before we go any further and I get into step-by-step instructions, can you check that your web hosting includes the use of PHP?

PHP is a scripting language that operates on the web server before the pages are sent to the browser. It's available on most web hosting packages, but you need to make sure.

Where is your hosting? And what level of account do you have? Some hosts have levels like "Bronze", "Silver", "Gold" where maybe the lowest level doesn't have PHP available.
Hi
Im looking for something like this that you did. The problem with me is that in our company we have more than 200 customers, and creating a page for each customer will be alot. I found a simple tutorial on how to create a php login form with php and mysql here http://devlup.com/programming/php/to...orm-mysql/200/

would you be so kind to take a look at it and help me on how to implement this on my webplusx5 site? I can use php and mysql in my web hosting provider.

All i need is to create the mysql DB in godaddy and put the login info with passwords and provide that info to our customers. I will use their customer number for the login and i will assign the password aswell. I have no idea on how to connect to the mysql DB through webplusx5.
Please help.

Thanks You
webuxer is offline  
Old 23rd July 2011, 06:23 PM   #27
mjh
The one and only mjh
 
mjh's Avatar
 
Join Date: Feb 2009
Location: Michigan USA
Posts: 74,639
mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)mjh has nothing more to prove (nirvana)
Default Re: Client Login for a newbie

Quote:
Originally Posted by webuxer View Post
Hi
Im looking for something like this that you did. The problem with me is that in our company we have more than 200 customers, and creating a page for each customer will be alot. I found a simple tutorial on how to create a php login form with php and mysql here http://devlup.com/programming/php/to...orm-mysql/200/

would you be so kind to take a look at it and help me on how to implement this on my webplusx5 site? I can use php and mysql in my web hosting provider.

All i need is to create the mysql DB in godaddy and put the login info with passwords and provide that info to our customers. I will use their customer number for the login and i will assign the password aswell. I have no idea on how to connect to the mysql DB through webplusx5.
Please help.

Thanks You
Please keep a question in one thread. Have you read the response in the other thread you started?
http://forums.serif.com/showthread.php?t=96028
__________________
---------------
T9900, 8 GB RAM, 512 vidram, WIN 7 Ult 64-bit - Chrome
mjh is offline  
Old 13th September 2011, 03:46 AM   #28
mhume01
New Member
 
Join Date: Feb 2011
Posts: 10
mhume01 is on a distinguished road
Default Re: Client Login for a newbie

I am looking to install a members area with specific links to the specific pages for billing.

I followed the instructions above on how to add the log in but whenever I put in either a right or wrong password I get a popup for mypage.php asking if I want to open or download the file. I am sure I missed a step or a checkoff. What do you think I'm missing? Im using Webplus X5.
mhume01 is offline  
Old 13th September 2011, 03:55 AM   #29
mhume01
New Member
 
Join Date: Feb 2011
Posts: 10
mhume01 is on a distinguished road
Default Re: Client Login for a newbie

NM, guess you actually have to upload the website to see it first instead of previewing. Thanks
mhume01 is offline  
Old 4th January 2012, 06:03 AM   #30
webuxer
Regular Member
 
Join Date: Jun 2011
Posts: 148
webuxer is on a distinguished road
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
Is there a way to hace in the signout page code to redirect to the index.html or to what ever page you want? I would like to have the link of sign out in the client page, therefore in that page the user should click the signout link and it should signout but at the same time it redirects the user to the index.html. What code should i add to accomplish this?

Thanks
webuxer is offline  
Old 20th January 2012, 12:58 AM   #31
scchoir
New Member
 
Join Date: Dec 2010
Posts: 17
scchoir is on a distinguished road
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
Thanks for these instructions - I am trying to set this up (fed up of waiting for the SWR/Chrome fix after months), BUT I have a problem with step 1:

Quote:
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
I can't see the three lines used for the passwords in the code for this page: http://www.martintaylor.co.uk/clientpages/mypage.php
Can't see them anywhere - what am I doing wrong??
scchoir is offline  
Old 27th January 2013, 08:47 PM   #32
ProperBoPeep
Regular Member
 
ProperBoPeep's Avatar
 
Join Date: Jun 2009
Location: Rugby, Warwickshire
Posts: 174
ProperBoPeep is on a distinguished road
Default Re: Client Login for a newbie

OMG -this has solved a problem that has been vexing me for about 12hrs!! Thank you all for your help with this - especially Martin.
ProperBoPeep is offline  
Old 6th May 2013, 04:01 AM   #33
davidspacek@hotmail.com
New Member
 
Join Date: May 2013
Posts: 4
davidspacek@hotmail.com is on a distinguished road
Default Re: Client Login for a newbie

So....
Is the conclusion of this tread that you cannot have the login screen redirect to a specific client page (depending on the username/password) without PHP hosting?
Thanks.
David.
davidspacek@hotmail.com is offline  
Old 21st May 2013, 03:24 PM   #34
Rwhybrow
New Member
 
Join Date: May 2013
Posts: 2
Rwhybrow is on a distinguished road
Default Re: Client Login for a newbie

Hi guys.....

I am trying to get this working on my website and have a question.

Do i need to list all the page in the code????

Ta
Rwhybrow is offline  
Old 21st May 2013, 05:34 PM   #35
Rwhybrow
New Member
 
Join Date: May 2013
Posts: 2
Rwhybrow is on a distinguished road
Default Re: Client Login for a newbie

This thread is great....

But when i go to log out on the website im getting Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7680 bytes) in............. Says my server address.

Any one?
Rwhybrow is offline  
Old 29th June 2013, 12:04 AM   #36
Tim Poole
New Member
 
Join Date: Jun 2013
Posts: 1
Tim Poole is on a distinguished road
Default Re: Client Login for a newbie

I know it's an old thread, but just wanted to say a big thank you to Martin for sharing this knowledge and taking the time to give such easy to follow instructions.
Tim Poole is offline  
Old 29th June 2013, 04:33 PM   #37
Martin Taylor
Expert
 
Martin Taylor's Avatar
 
Join Date: Feb 2009
Location: East Herts, UK
Posts: 5,868
Martin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant futureMartin Taylor has a brilliant future
Default Re: Client Login for a newbie

Quote:
Originally Posted by Tim Poole View Post
I know it's an old thread, but just wanted to say a big thank you to Martin for sharing this knowledge and taking the time to give such easy to follow instructions.
Thanks, Tim. It's good to know that it's still of use after all this time!
__________________
Martin
Martin Taylor is offline  
Old 11th August 2013, 03:39 PM   #38
jimmyblue
New Member
 
Join Date: Aug 2013
Posts: 1
jimmyblue is on a distinguished road
Default Re: Client Login for a newbie wpX6

Quote:
Originally Posted by Martin Taylor View Post
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
Complete php newbie here - Using WPX6 I've followed the instructions above and used FTP to upload to my site. As soon as I click in the new link to the "control page" I get a 404 error page not found.

I've downloaded the clientpages.wpp file form Martin's message and installed that on a subdomain but get the same error when viewed. I'm using Hostgator who I thought supported php. Any ideas where I might be going wrong?
jimmyblue is offline  
Old 24th February 2014, 06:36 PM   #39
splatter
Regular Member
 
splatter's Avatar
 
Join Date: Feb 2011
Location: North Wales
Posts: 144
splatter has a spectacular aura about
Default Re: Client Login for a newbie

Quote:
Originally Posted by Martin Taylor View Post
Done it anyway!

1. The control page

Add a "New HTML Page" to your site
Give it a page name "Control page"
Give it a file name "mypage.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Copy all the code from this same page on my example site, and paste it in there
You can see at the top of the code the three lines I used for the passwords
Each one has the password in square brackets, and the name of the client page after the equals sign
You can add, remove or change the passwords as necessary

Make a link on your home page to this "Control page", but use text like "My page", or "My photos" ...

2. The login page

Make a login page, using WP's normal editor
Give it a page name "Login page"
Give it a file name "login.html"
Remove it from the Navigation
Add a form
Add an edit box to the form
Name the edit box "mypassword"
Double click the form
Select "A remote script"
In "URL of remote script", enter "mypage.php"
Change the "Encoding type" to "multipart/form-data"

3. The client pages

Create a page for a client
Give it whatever page name you want
Give it a file name to suit your needs, but make sure it ends with ".php" and not ".html"
Remove it from the Navigation
Right click an empty area of the page and select "Attach HTML"
At the very top of the page, find the white area labelled "<!--Page Preamble-->"
Enter the following PHP code (this prevents the page being opened unless you're signed in)
Code:
<?php
if (!isset($password)) {
  include ('login.html');
  exit;
}
?>
Repeat that same thing for every new client page

4. Sign out page (optional)

Add a "New HTML Page" to your site
Give it a page name "Sign out page"
Give it a file name "signout.php"
Remove it from the Navigation
Open that page in the editor - WP will display the code editor
Delete all the default code
Paste this PHP code in there instead:
Code:
<?php
session_start();
unset ($_SESSION['password']);
include 'index.html';
exit;
?>
Make a link on your home page to "Sign out page"
..have been looking for this exact thingy for site am working on..different passwords for different users to login to separate pages..works really well and so much easier than working through SWR..takes 5 seconds to add a page and password etc..well maybe 10 seconds. Thank you
__________________
www.cabbagetree.co.uk
splatter is offline  
Old 29th June 2014, 06:29 AM   #40
mauriciorey
New Member
 
Join Date: Sep 2011
Posts: 1
mauriciorey is on a distinguished road
Default Re: Client Login for a newbie

I used the suggested php code and I have a problem.
I have a java dropdown menu linking to anchors on the page itself, when accessed an anchor, the site is directed to the login page.
Attractions.
Can anyone help me?
mauriciorey is offline  
 

Bookmarks

Tags
client login

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24 PM.