Computers and Technology
Posts tagged functions
Some useful PHP functions
Apr 15th
Recently, I have noticed that I use the same exact functions over and over again in PHP. I’ve actually set-up a complete function list that I tend to include in all of my projects. Here is an overview of some of them.
Let’s connect
You will need to connect to your database from time to time. It is important to do that in most projects that deal with MySQL, and you’ll probably do it frequently, on every page. Now, you can either delete that “function CustomConnect” and the braces and simply include() this part as a file orrr, just add this to your function list and call it up whenever you need it:
Just a little stupid Javascript App
Mar 21st
Remember how I promised I would learn Javascript so many times in the past? Well, I finally got around to learning some of the basics. And just like I did with PHP when I was learning it, I decided to create a simple application. I could not come up with a good idea so my friend suggested one and within a couple of hours I finished it.
Here is the demo. I received some positive feedback from a lot of people so I thought I’d show how I, first of all, made it and how it helped me learn Javascript.
More >
Creating a Blogging System (Part 2)
Jan 18th
Creating a Blogging system (part 1)
Jan 13th
Some time ago (a couple weeks), I created my own blogging system. No one told me how to do it and I didn’t read any tutorials on how to do it either so there were a few things I learned the hard way. As you know, Blogs are database-based, they’re all entries in a table.
You have an entry for the id, date, the content, and miscellaneous other information such as tags, and description. In this tutorial, I’d like to teach you how to do all that.
/* LET'S GET STARTED!*/
“Tweet This” and URL shortening API
Dec 19th
Alright, you’ve all seen those CRAZY “Tweet This” buttons on so many websites, (mainly wordpress). You may have also noticed that some just send you to twitter and you have to manually input the twitter message. Well, how about we just make a button that will automate all this for us?
I really do love it when I click on that button and twitter pops up with a pre-written message like “Check out this site : URL GOES HERE” or “Crazy CSS tutorial on backgrounds. Check it out: URL GOES HERE”, it makes it much easier for me to share my finds. Here’s a great demo.
Okay, I’m working on a new website and it has various posts on it that I want the readers to be able to automatically share on twitter. I also want to include a backlink so that their twitter followers can visit the actual article. Basically, here’s a tutorial on shortening URLs using API and for creating a twitter button.
Custom E-mail Form
Oct 15th
AH! So I have to create a custom e-mail sending form. He wants me to create a webform that will ask for a person’s name and e-mail address. Once those are input, an e-mail will be sent to the person’s e-mail account with a thank you message. Meanwhile, the website will reload with a custom coupon that bears their name. I’ll need it printable so I’ll have to add a print button as well.
Sounds simple enough, right?.. right?
More >