I'm creating a blog for a website, so I need a text box to add its content to a div script. How would this be done?
Also, I have created a basic password system with PHP, when the user enters the correct password, the PHP will return to the index. However, how do I make the HTML know when the password was correct? Hopefully changing the index page allowing the user to see and use a text box.
HTML PHP checker & Text box adding text to HTML script
Moderator: General Moderators
-
JasperHope
- Forum Newbie
- Posts: 1
- Joined: Sat Apr 17, 2010 4:43 am
-
maneetpuri
- Forum Commoner
- Posts: 60
- Joined: Tue Oct 07, 2008 6:32 am
Re: HTML PHP checker & Text box adding text to HTML script
Hi,
To answer your first question>>
Create a separate form that will take the content and store it in a database. Then on the blog script you will have to read this content and show it.
For the second one>>
Once the user has entered the password and you have authenticated it then create a session variable and on HTML/PHP pages check for the existence of this session variable, if it does then it means that user is authorized and if not redirect the user to login form.
Hope this helps.
Cheers,
~Maneet
To answer your first question>>
Create a separate form that will take the content and store it in a database. Then on the blog script you will have to read this content and show it.
For the second one>>
Once the user has entered the password and you have authenticated it then create a session variable and on HTML/PHP pages check for the existence of this session variable, if it does then it means that user is authorized and if not redirect the user to login form.
Hope this helps.
Cheers,
~Maneet
Re: HTML PHP checker & Text box adding text to HTML script
I would also suggest running this through an MVC architecture of some sort or you will be needing to add the user validation to the top of each and every page which will become tedious as you add more content