Thursday, March 15, 2012

PHP Tutorial :: Part 1 :: Intro to PHP

  • How to create a php file
    • name the file xxx.php (xxx being whatever you want)
    • enclose any php coding on the page with <?php to start and ?> to end
  • How to insert text or html in a part of the php file that is enclosed in the <?php and ?> tags
    • echo "putwhateveryouwantinhere";
    • for example:: 
      • echo "<center>Here is some text and <img src='blah.jpg'> that was an image</center>";
  • How to include another php file inside your php file
    • you would want to do this if there is a bit of code you use over and over on different pages
    • you will either use include or require - require will cause it to fail if it cant find it
    • for example
      • include "includes/header.php";
      • require "includes/navigation.php";
  • What is a php variable
    • a php variable is a variable that you apply a value to and use in equations, allowing for dynamic websites
    • a php variable is denoted by the $ sign in front of a word
    • for example
      • $age
      • $name
      • $username
  • How to declare or assign a php variable
    • you will use the equal
    • for example
      • $age = "23";
      • $username = "cooldude23";
  • How to pull information from a database
    • first you have to connect to the database
      • $dbh=mysql_connect ("localhost", "insertdatabaseusername", "insertpassword") or die ('I cannot connect to the database because: ' . mysql_error());
      • mysql_select_db ("insertdatabasename");
    • next you have to throw a query at the database
      • $query = "SELECT * FROM tablename WHERE username='sally'";
        $result = mysql_query($query)
        or die ("Couldn't execute query.");
    • next you have to format the way the query will show up, like in this example with a while loop
      • while ($row = mysql_fetch_array($result))
        {
        extract($row);
    • next you will want to print what you want from this loop
      • echo "<h2>Rows :: $variablefromdb</h2><br><br>";
    • finally you will want to close the while loop
      • }
    • that will print all of the variablefromdb values from that table when the username is sally

Friday, February 10, 2012

Clip It with Clipix!

Have you heard about the new way to organize your internet experience? I just found out about it recently and signed up for it myself. Perhaps I cheated, but what I did was connect with Facebook. Do you know how long it took me to sign up? Less than 3 minutes. And in the end I am left with a pretty cool organizational tool.

You can clip items from the web and save them into your Clipix account for later viewing and for sharing with friends. Personally, my favorite thing to clip is recipes and things that I would like to buy. You, however, can use it for anything from saving funny comics, to books, to restaurants you want to try or movies that you would like to see. It works out like a global wishlist for any website on the net. Below is a screenshot from the last thing I added to my wishlist!

The best part is that they have an iPhone app. So you can be on clipix anytime, even when youre sitting in class or avoiding the word on your desk.

I highly recommend that you go to clipix and sign up for an account. It will only take a moment or two. Go ahead and leave a comment below on what you would use clipix for! 

Promoted Post
Visit Sponsor's Site

Monday, February 6, 2012

Walgreens Pharmacy Savings Club

This is a Sponsored post written by me on behalf of Walgreens for SocialSpark. All opinions are 100% mine.

I recently found out that my local Walgreens Pharmacy has its very own prescription savings plan. The best part is that it is on sale and heavily discounted right now, so it may be something you want to get on board with before the price goes back to normal. The Prescription Savings Club at Walgreens is a program that wil,l discount more than 8,000 brand-name prescriptions and all generic medications. This program also will give you a discount on flu shots, on pet prescriptions, and even on nebulizers and any diabetic supplies. As if that wasn't enough you will get bonuses when you purchase Walgreens brand products and even on the photofinishing services.

You can stay up to date on these and other great sales at Walgreens by following Walgreens on Twitter and by liking Walgreens on Facebook. The current sale they are offering for this savings plan is only $20 per person or $35 for your whole family. If you get the family program you, your spouse, your kids, and even your dog will be covered! If anyone in your family is a diabetic or has even just one recurring prescription, then this plan will pay off for you. Check it out at your local pharmacy!

Visit Sponsor's Site

Friday, January 27, 2012

Contest - Pimp Your Cubicle

This is a Sponsored post written by me on behalf of Contest Factory for SocialSpark. All opinions are 100% mine.

 

I don't know about you, but I am not one to turn down a cubicle makeover.

Pimp My Cubicle is looking for the worst, messiest, dirtiest, darkest, oldtech cubicle they can find. They want people to upload videos of bad cubicles and the winner will win one of three prize packages.

  1. A New High End Computer System
  2. A New Desk, Chair, & Decorations
  3. A New Entertainment Package with High End Stereo, Espresso Machine, ETC

Right now not a single video has been uploaded so your chances of winning are very high. You can easily upload a video from your phone to the website so there is no excuse not to share your embarrassing workspace with the world.

 

 

Your video should be fun and creative - there are no rules. The more interested we are the better chance you have of winning. There is an additional sweepstakes prize of a $200 gift card that will be given to a random registered user. You only have until 12pm on 1/31 to get your entries in. So visit the PMC site and register and upload videos to enter the Pimp My Cube Contest. Once your video is approved encourage your friends and family to vote on your video to increase your chances of winning.

Visit Sponsor's Site

Wednesday, January 18, 2012

Thursday, January 12, 2012

Express Scripts and Walgreens Negotiations

This is a Sponsored post written by me on behalf of Walgreens for SocialSpark. All opinions are 100% mine.

Have you heard about the situation with Walgreens and Express Scripts? On December 31 the contract expired between Walgreens and the the insurance middle-man Express Scripts. This means that those who have insurance that deals with Express Scripts will no longer be able to use Walgreens to fill their scripts. So if you currently pick up your scripts at Walgreens, you may want to confirm that your insurance has not removed their coverage of Walgreen's services. This is enraging customers because they will not have to possibly drive further and use pharmacies with less convenient hours, and certainly without the Prescription Savings Club at Walgreens.

Walgreen's attempts to renegotiate this contract involved an attempt to help support military and military families by negotiating a better contract for Tricare, which serves the military. This was a failed attempt on Walgreen's part as Express Script would not allow WG to put a lock on rates so prescription rates could not increase further.

In the meantime, Walgreen's is trying to help the affected customers by offering a special discount on annual membership for its Prescription Savings Club at Walgreens. If you are effected or enraged by the situation feel free to contact your local media to let them know what is going on and that you aren't happy about it. Support Walgreens in their fight against riding medical costs by following Walgreens on Twitter or by liking Walgreens on Facebook.

Visit Sponsor's Site

Friday, January 6, 2012

Contact Plus Pro - Letter Templates Hidden From Some Users

Fix :: log into those user accounts and under global settings select word processor. Change it from internal word processor to your Windows 2000/XP etc

You should now be able to click f6 and see all of the letter templates.

Tuesday, January 3, 2012

CSS Gradient

background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000));

Thursday, December 22, 2011

Snap! Its Snapdragon Stadium!

This is a Sponsored post written by me on behalf of Snapdragon by Qualcomm for SocialSpark. All opinions are 100% mine.

Some exciting news came out today. The Qualcomm stadium is being temporarily renamed the Snapdragon Stadium for 11 days beginning on December 18. They are doing this to promote the Snapdragon processors by Qualcomm are the digital brains inside mobile devices made by top manufacturers like Samsung, LG, Nokia, and HTC.

This is pretty exciting because of how rarely this is allowed to happen. But also because of the sweet events that will happen at Snapdragon Stadium.

  • The Chargers will play Baltimore on Sunday night. 
  • The San Diego County Credit Union Poinsettia Bowl
  • The Bridgepoint Education Holiday Bowl

Don't forget the renaming will happen on December 18, and stay that way until the 29th of December.

While I, personally, have never been ot the Qualcomm stadium, I think this is a pretty sweet event going on. If there were to temporarily rename our Tropicana Field (where the tampa bay rays play) to something else that would be pretty neat. For instance, if we were the Tropicana Gold or Tropicana No Pulp... That would be pretty funny. I wonder how much of this is just an additional sponsorship during those events, and how many people may actually call the stadium the Snapdragon Stadium. Personally, Snapdragon sounds cool to me... I am pretty sure if I lived there I would continue calling it Snapdragon after the 29th.

Visit Sponsor's Site

Related Posts Plugin for WordPress, Blogger...
Web Design & Marketing - Click and get an instant quote on your project