HTML PHP checker & Text box adding text to HTML script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JasperHope
Forum Newbie
Posts: 1
Joined: Sat Apr 17, 2010 4:43 am

HTML PHP checker & Text box adding text to HTML script

Post by JasperHope »

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.
maneetpuri
Forum Commoner
Posts: 60
Joined: Tue Oct 07, 2008 6:32 am

Re: HTML PHP checker & Text box adding text to HTML script

Post by maneetpuri »

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
User avatar
JAY6390
Forum Newbie
Posts: 20
Joined: Sat Apr 17, 2010 6:51 am
Location: UK

Re: HTML PHP checker & Text box adding text to HTML script

Post by JAY6390 »

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
Post Reply