PDA

View Full Version : Help with Form Actions


Steph2010
11-12-2010, 02:27 PM
Hi Everyone,

I have tried to get some help on adobe with this, but noone bothered getting back to me. Can you let me know if you can help instead please???

I am a bit of a novice helping someone out with some problems they are having with a new website.

I am not very familiar with the use of forms and actions, and I am trying to set up a page with a login section which will not be in use immediately. Therefore, just incase anyone tries to login, I want an error page to appear after they hit the login button.

Can someone help me with how to do this please?

Thanks a million for your help (in advance)
Steph

Corrosive
11-12-2010, 03:48 PM
Hi Steph and welcome to the forum. If you have a user log-in created then it will search a back end database to confirm a record. I.e. if username and password brings back a match it will allow access to the page using a PHP

header("Location: pages/page.php"); command.

If the query fails (as it will in yoru case because you have no users) the simply set the location as your error page. That should handle what you need.

gentleone
11-12-2010, 04:11 PM
I am trying to set up a page with a login section which will not be in use immediately. Therefore, just incase anyone tries to login, I want an error page to appear after they hit the login button.
If it's not going to be used on the site yet, then I'd recommend to just leave it out of the site. Why forcing visitors clicking a button that doesn't do anything yet (except for that error page then). Put the login section on the site when it's active.

Corrosive
11-12-2010, 04:48 PM
If it's not going to be used on the site yet, then I'd recommend to just leave it out of the site. Why forcing visitors clicking a button that doesn't do anything yet (except for that error page then). Put the login section on the site when it's active.

Yeah, I'd agree with this.