So I was up late last night making some tweaks to my blog theme and realized that now would probably be a good time to share some of my PHP knowledge with new Domainers. PHP is an essential language to know when working with WordPress and comes-in handy for building your own sites as well. The great thing about PHP is that it is nowhere near as complicated as a programming language like C++ or Java so you can learn and begin using PHP very quickly.
So for the month of June I will be doing a four-part series on PHP that will get you up and running without having to read one of those “Learn PHP in 24-hour” books. I think PHP is an essential language for any Domainer that is also a developer. As more and more Domainers start blogging or developing mini-sites PHP will continue to become increasingly important. If you’ve ever been confused by the inner-working of your WordPress themes I hope this helps to allow you to customize your themes beyond the WordPress GUI.
So let’s get started with the first lesson!
Okay – so what is PHP? I’ll make this quick so we can get to the good stuff. PHP is a way to build interactive websites. It is considered a server-side language which means that the code you write will run on your web server rather than a web visitor’s computer (Javascript on the other-hand is a client-side language which runs on the web visitor’s computer). PHP allows you to breathe life into your websites by adding dynamic content – and with a blog this is very important!
You can add PHP to an existing website easily by simply typing when you want to start writing “<?PHP” before your code and then "?>" when you are done with your code. That’s it – put your PHP code between these two tags and you are ready to go. So time to learn your first PHP function – print. The code snipped below will write – “Hello Domaining World” on your site:
<?php
print “Hello Domaining World”;
?>
If you put this into an HTML document and upload it to your server (given that is supports PHP which just about every hosting company has pre-installed) then you’ve just written your first working PHP code! Pat yourself on the back and we’ll move-onto something a bit more interesting.
Let’s cut to the chase and make something interactive. Where PHP really shines is interacting with HMTL forms. Now I’ll show you how to make a simple form on your website that you can then interact with using PHP – first let’s start with a basic HTML form:
<form method = “POST” action = “domainvestors_form.php”>
Name: <input type = “text” name = “username”>
Domain: <input type = “text” name = “domain”>
<input type = “submit” value = “Submit”>
</form>
Related posts:









{ 9 comments… read them below or add one }
Thanks a lot! That was really helpful and I look forward to reading the next installments.
Thanks Lisa! Let me know if you have any questions along the way!
Good initiative Morgan. I guess many domainers a new to writing code.
I’ve also recently started writing about PHP for domainers on my blog.
First topis is: how to build a simple domain parking / mini-site solution using PHP and MySQL. Maybe your readers can go there after learning the basics?
Looking foreword to read next article on PHP
Very helpful. I’m also looking forward to future installments!
Thanks! Glad you enjoyed the post!
Thanks – I really enjoy writing about this!
Thanks Johan! Please feel free to send me an email each time you write a new article and I’ll definitely share this with my readers!
Sure, I’ll try to remember that…the first post probably needs some cleaning up as well.
Later.