background preloader

Webdesign

Facebook Twitter

Learn Web Design, Web Development, and iOS Development - Treehouse. PHP MySQL Shopping Cart Tutorial. PHP for Beginners: Part 3 – Email with PHP. Today We are continuing our PHP series.

PHP for Beginners: Part 3 – Email with PHP

One of the major uses of a server side scripting language is to provide a way of sending e-mail from the server and, in particular, to take form input and output it to an e-mail address. In this part I will show you how to send e-mail messages using PHP. For those who missed the previous parts: Part 1 Part 2 PHP mail() function E-mails in PHP can be easily sent using the library function ‘mail’. Recipient E-mail addressE-mail SubjectE-mail message (body)Headers and additional parameters Syntax: The section $headers is used for any additional e-mail headers you may want to add. This function returns the boolean value ‘True’ if the mail is sent successfully, otherwise it returns ‘False’. Sending An E-mail Before sending your mail, if you are using variables, you must, of course, set up the variable content beforehand. This code will actually do two things. Formatting E-mail Something you may have noticed from the example is that the From line ended with \n.

Creating Your Own CMS Part 1 - Secure Login. Have you ever built a site to realize it is a pain to manage?

Creating Your Own CMS Part 1 - Secure Login

There are a lot of CMS options out there but some of them cost money, some are hard to learn, some your hosting company might not support, and well sometimes they just don’t have everything thing that you want. So today I am going to start to teach you how to create your own simple CMS. Today I will get into how you can find a design and get your secure login setup. This will be a series of blogs but to be honest I am not sure how advanced I will be going.

If I wanted to spill it all and tell you how to build the CMS that my company uses then it might take a few blogs. Design of Your Own CMS This may or may not be important to you. Here is the one that I chose as well as a few others to browse through. I am creating this CMS as I type this so you guys are looking at it first hand. A Few Things To Have Before You Begin the Login admin/ classes/css/images/includes/lib/markitup/cache/classes/css/images/includes/lib/ Creating Your Own CMS Part 2 - Access Levels & Administrators. Alright if you have read the first article that we worked on a while ago “Creating Your Own CMS Part 1 – Secure Login” then you should have some sort of CMS design with a secure login.

Creating Your Own CMS Part 2 - Access Levels & Administrators

Now that we can login to our CMS we will need to have an easy way to add an administrator and of course give them access to only certain parts of the CMS. But first one little thing that I decided to add in to make it easy for you to login without having to manually add an entry in phpmyadmin was to make the first login attempt double as a create user. You can see in the above query that I set the field super_user=’1′ on my insert. I did this because this should be the main/root/admin account or whatever you would like to call it. And later when we make permissions the super_user will be giving access regardless. Creating Your Own CMS Part 3 - Advanced Features. If you have been following along you should have a simple CMS built that has a place to securely log in and you should be able to create some users and access levels for your site.

Creating Your Own CMS Part 3 - Advanced Features

If you are creating a CMS you will need more than just to be able to log in and create users so here in part three we will get into a few of the things that you can do with your own CMS. A few people have really knocked the idea of creating your own CMS which is fine because we can all have our own opinions so I will just tell you all why I personally like to use my own. Reasons You Might Build Your Own CMS First off, the main reason is that you have 100% control. How to Create a PHP Website Template from Scratch. This is a tutorial on creating a PHP website template starting with HTML and CSS.

How to Create a PHP Website Template from Scratch

We will start with the basics and you can also download the final product. Please remember that I am using very basic CSS styling in this example just for you to get the idea, and not so much to make it look pretty. The download will contain both the styled example as well as a complete blank template that you can use for your own starting point for any project personal or commercial. The demo files are released under GPL V2.

This tutorial assumes you have basic understanding of html and css. The actual template will be created in 10 easy steps. Step One Let’s start by creating a new folder. Inside of this folder we are now going to create two new files. Step Two Now we are going to create two more folders inside of our main folder. We should now have a setup that looks like the following: Step Three Now, using your favorite html editor open the index.html file. Step Four Step Five Step Six Step Seven.