Just completed the W3Schools PHP Quiz and got the following result
Result: 17 of 20 85%
You can be proud of yourself!
.Should have done better really, but 85% is not a bad result. Give it ago and see what you get, it’s easy. W3Schools PHP Quiz
Why did I get into learning PHP? Because I wanted to understand how a website was built correctly. I had a old website with blogging software from b2evolution, gallery from coppermine and couple of static pages put together not knowing how the code worked. So to upgrade things I started to learn how a website was built & developed, and what technologies were required.
The first part was to understand (X)HTML & CSS and then from that point you can go on to learn PHP with MySQL. You can find many tutorials online as an example of a resource of PHP tutorials at Nettuts. I also find buying an old book was very good as it meant that I was learning in a more structured manor then if I used online tutorials. So the book I brought was PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide and also PHP 5 Advanced: Visual QuickPro Guide (2nd Edition).
I have now finished the first book and will be finally starting work on my first PHP & Mysql application
If you are testing the PHP mail function mail( ) running from your own localhost and you do not what to run your own mail server this may help.
I was testing a PHP activation script that would send a email to another email to activate the new users account. My environment is all ran locally, and I had no desire to set-up a proper configure mail server or use Pear mail.
So to get around this problem I installed webmin so that I could easily access postfix mail server and to receive the email.
sudo dpkg -i webmin_1.340_all.deb
Once installed you can log into webmin using your root password.
Now when sending the activation email insure that you send it to root@locahost, do not include .com or . anything as this did not work for me.
If you have any validation within your script make sure everything relation to email validation is changed.
Changing PHP validation (preg_match)
Normal Validation in php
Once you do this you should be able to access the email via webmin within the postfix module. Goto servers, users mailbox, select root or your system user name.
Came across this the other day, it’s the MySQL University that offers free educational online program for engineers/developers. It’s open to everyone to just join in by using DimDim, a web based conference tool build in Flash.
The session room opens 15 minutes before the live sessions starts, but you can also catch up on previous shows if like me you probably will not be able to catch the live session. Go here for list of previous sessions
For more information and please visit the MySQL University homepage
If you are playing around with PCRE in php and are you having problems with using character classes or shortcuts, remember to check your php.ini file.
I was having problems and after much head starching, i found out that you have to disable magic quotes in the php.ini file. So run phpinfo() to locate the file and then ensure the below is set to “Off”.You could use stripslashes() within preg_match() to stop extra “\” being generated. But that is really extra code that you do not need.
; Magic quotes
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ‘ with ” instead of \’).
magic_quotes_sybase = Off
I have been working on making a login page as part of learning php. This method also included using cookies, not everyones favorite but I had to learn about it. The thing with cookies is that they must be sent from the server to the client prior to any other information.
This was the area that was creating my problem, every time I logged in I would get this error.
Cannot modify header information – headers already sent by (output started at /var/mysqli_connect.php:18)
This is a common error when creating cookies. So pay attention to the error message, which is something I did not do straight away. All I had to do was delete any white space after my closing ?> in mysql_connect file.
Been making slow but steady progress with php & mysql learning this month. I feel that things are starting to fall into place and soon I’m going to start work on my first project.
It’s going to be php & mysql based links/bookmarks page for the main basshead website. Currently it’s an old static page that was put together a few years ago before I had a clue about basic structure of HTML etc. I could use scuttle as used by weloveit on they bookmarks site, but it’s something I would like to write from start to finish as it would be a good learning platform. Also this will start life as a page for basshead links/bookmarks that can only be updated by myself as I will not be allowing anyone else to input bookmarks as it is not a social networking bookmark system like scuttle. If this project works out ok then anyone can use it, and change it so it becomes social networking based.
I have set up an add-on site to dev.basshead to handle the developments of me learning mysql & php. Various new applications will be added to it as I progress. This week it’s the egg cost calculator LOL
A new release of GIMP is now available for download, so I’m looking forward to using it and seeing what changes have occurred since the last one. For more reading and a in-depth look then check out the arstechinica article.
The desktop evironment of Gnome 2.24 has been released today and will be included in the next release of ubuntu.
One of the approvements that I think will make a real difference is the minor adjustment to Gnomes Nautilus file manager, to include tab browsing. Also as you can guess a lot more updates have been included.