Vincent Reniers | From PHP Guru to Designer!

Archive for March 2009

Mar/09

16

Current Plans : New CMS

At the moment I’m planning on making a new cms. So I’m looking at other applications and how their template engines work. The way they process errors, load modules and error handling etc. So far I’ve already managed to create a smooth looking template. It’s not finished so far, I will put it online as soon as I’ve got it sliced etc. =).

, , Hide

Mar/09

10

VRMedia Webdesign

I’m still working continously at the website for my company that might come some day =). So far the layout is finished, the basic cms structure is done so now I’m just working on the applications to drive every page and then I’ll simply have to finish the admin side.

Web 2.0 Layout

Tell me what you think about it? Personally, I really like it so far =D.

, , , Hide

Mar/09

9

PHP : Basics Explained

1.Introduction
What is PHP? PHP is a server-side programming language. This means it processes a certain script to create a dynamic output in HTML. In most cases PHP is used together with some sort of Database such as MySQL. For example when a user clicks on the news page. The News.php script can ask the 10 latest news articles from the MySQL database. And while it is requesting this information it can sort it out in HTML tables with a heading, comment button etc. When you’re just using HTML you can’t do this and your information will always be static. Now let us take a quick view at how a PHP script may be.

<?php
echo("Hello Visitor");
?>

This will just output the string : Hello Visitor. As you can see the PHP script starts with <?php and ends with ?>. This tells the server when the PHP module will have to start processing the script and when the normal static HTML begins ( after the ?>). Echo is the function. Functions can handle information the way you want them to deal with it. But we’ll come to that later. As you can see we tell the script that we’re processing a string by placing it between the ” ” quotes. And each function ends with a ; character. Let us continue with variables.

2.Variables

<?php
$variablename  = "content";
echo $variablename;
?>

This script will output : content . Variables are used to store information. Just temporary of course. After the script is done at the very very end. When the client is looking at the page with all the processed information. At this part the PHP script will automaticly remove these variables. This is an automatic process wich is called the ‘Garbage-collector’. But you can delete variables yourself if you like. You can do it this way.

<?php
unset($variable);
?>

3.Cookies
This is mostly advised when the variable holds a large amount of data. So you can unset it when you no longer need it. But when using normal scripts you don’t need to worry about it. Ok so how can you store information permantently? Through databases, with sessions or with cookies! Yes cookies =D. Cookies are stored in your browser, but of course the visitor needs to allow the cookies to be stored in his settings. Thats why you can’t login on sites when you don’t store cookies. For example when you login on some site. And your pass and username are correct the script normally creates a cookie with the name ‘username’ and as value your name. And a cookie ‘password’ and your password. And each time you go to a page the script checks if you have a cookie username so it recognises you as logged in. You can set cookies like this.

<?php
setcookie("username", "vincent"); // for example
?>

4.IF and ELSE statements
This is how you set a cookie. The text after the // is seen as a comment and the PHP script simply ignores this. Now you know what functions can do. PHP has a lot of functions preprogrammed wich you can find on www.php.net As for the basics of PHP i’m going to explain you another aspect. After this you will understand the very basics and you will be set to learn a lot more in the documentation or with other tutorials.
The IF and ELSE statements. These are so handy. Like suppose you want to see if a user is logged in.

<?php
$user = $_COOKIE['username'];
if($user){
echo("Welcome $user");
}
else{
echo("Welcome Guest");
}
?>

The user variables gets the information from the cookie ‘username’. If it exists and if there is information in the cookie. It will welcome the user and display its username. Otherwise it will welcome the guest.
The actions that will occur when the statement is true are always located between the { } brackets.

So that was my tutorial about the basics of PHP explained. I hope you have learnt a lot. And if you have any more questions don’t hesitate to comment below and ask your question =).

, , , , , , , Hide

Mar/09

9

Electro is da new style

Have fun with some videos i snatched from youtube =).

Booka Shade – Body Language

I’m quiet a big fan of Booka Shade as you can see =). Even though these songs don’t have vocals its still so nice and relaxed to listen to. The second song is maybe a bit old but I ran into it today and it still rocks my socks.

Sebastien Leger & Chris Lake – Aqualight

, , Hide

Mar/09

9

DesignCode

Was having some fun in Photoshop. My aim was to design a Web 2.0 layout have a look at what I made and tell me what you think =).

Web 2.0 Layout

I’d say it looks pretty good =). Clickon it to see full size.

, , Hide

Mar/09

9

First blog online! =D

So this is it peeps, I got my first real blog online. I was first intending to design the layout and system myself. But I came to the conclusion i’m too lazy to do it after I made a couple of layouts. But why make something new when there already are fantastic systems on the market like WordPress. Don’t you just love its features, community, tons of plugins and themes and best of all its free! And damn the admin layout is really horny too lol. They really know how to use CSS & HTML to its fullest and how to master the PHP skills.

Enough said about WP, now what will you be expecting to see on this website the coming days? The answer to this question is… Website reviews, some coding tutorials, maybe even free web resources etc. Only thing I want to obtain is some crazy ass visitor results. I always love watching my graphics go up and down. Preferably the first thing. ^^. So stay tuned!

Vincent

, , Hide

Find it!

Theme Design by devolux.org