iD Tech Camps

Save money on camp with this special offer

Search Our Site

The World's #1 Tech Camp

iD News and Blog

Request a Brochure

You are currently browsing our archives.

Populating a Combo-box in PHP Dynamically from MySQL

For this article, let’s pretend you have the following database table. There are two columns (I’m separating the fields with commas for readability), Item and Price:

Cheese Pizza, 1.00
Pepporoni Pizza, 1.50
Sausage Pizza, 1.50
Cheese Calzone, 1.50
Ham Calzone, 2.00

What if you want to populate a combo-box with your possible options? We can write php that generates a drop-down box that has five item choices in it, based on our table above. Here is the sample code:

<?php

  // Connect to the database
  mysql_connect("localhost", "user", "password") or die(mysql_error());
  mysql_select_db("name") or die(mysql_error());

  // Has the form been submitted?
  if (isset($_POST['item'])) {

    // The form has been submitted, query results
    $queryitem = "SELECT * FROM table WHERE item = '".$_POST['item']."';";

    // Successful query?
    if($result = mysql_query($queryitem))  {

      // More than 0 results returned?
      if($success = mysql_num_rows($result) > 0) {

        // For each result returned, display it
        while ($row = mysql_fetch_array($result)) echo $row[serial];
      }
      // Otherwise, no results, tell user
      else { echo "No results found."; }
    }
    // Error connecting? Tell user
    else { echo "Failed to connect to database."; }
  }
  // The form has NOT been submitted, so show the form instead of results
  else {

    // Create the form, post to the same file
    echo "<form method='post' action='example.php'>";

    // Form a query to populate the combo-box
    $queryitem = "SELECT DISTINCT item FROM table;";

    // Successful query?
    if($result = mysql_query($queryitem))  {

      // If there are results returned, prepare combo-box
      if($success = mysql_num_rows($result) > 0) {
        // Start combo-box
        echo "<select name='item'>n";
        echo "<option>-- Select Item --</option>n";

        // For each item in the results...
        while ($row = mysql_fetch_array($result))
          // Add a new option to the combo-box
          echo "<option value='$row[item]'>$row[item]</option>n";

        // End the combo-box
        echo "</select>n";
      }
      // No results found in the database
      else { echo "No results found."; }
    }
    // Error in the database
    else { echo "Failed to connect to database."; }

    // Add a submit button to the form
    echo "<input type='submit' value='Submit' /></form>";
  }
?>

March 31st, 2009 | Tags: , , , ,

Posted in: iD Tech Bloggers

iD Summer Camp Staff Retention: 65 Percent!

When you choose your child’s summer camp, you want staff and instructors who are knowledgeable, caring, professionally-trained and FUN! As a family company, we place huge importance on hiring, training and retaining only the best staff. Other summer camps may boast these features in their summer staff, but few can say they have a staff return rate of 65 percent. iD Tech Camps can. This is the iD Difference.

iD Tech Camps recruits tech savvy, passionate staff from the nation’s top institutions including UCLA, Princeton, Stanford, UT Austin, NYU & more!

Our goal is to ensure that every location is comprised of experienced, returning summer camp staff along with new individuals who bring a fresh perspective and energy to camp. Our staff knows that when they get to camp, they will be working alongside the best in the industry. We interview thousands of candidates each year – but only those applicants who meet our strict criteria are chosen. Next, staff are required to pass strict guidelines and attend in-person trainings. Much of the success of iD Tech Camps we attribute directly to our careful staff selection process and comprehensive training.

“Our hiring process is one of the most strict I’ve seen in the entire summer camp industry,” said Kate DeHart, Human Resources Manager at iD Tech Camps. “We hire adult-only staff and we conduct criminal background checks, multiple reference checks and require valid CPR & First Aid certification and in-person training of our staff members. We work hard with risk management specialists to anticipate problems before they even arise. That’s no small feat!”

A 65 percent summer camp staff return rate means our staff is committed to providing an amazing experience for your kids. Staff retention-like camper retention-means we’re doing something right. How we teach is a big factor.

iD Tech Camps provides some of the best camper-to-instructor ratios, with an average of 6:1. The small class size allows campers the individual attention necessary to thrive in their chosen course(s) and the opportunity to complete an impressive project by the end of the week. Instructors then get the opportunity to bond with their campers and create lasting memories that encourage, inspire and drive campers to do something big with what they learn at camp. We have built our reputation on small ratios. Parents notice. Instructors are inspired. Students are engaged. The quality speaks for itself.

“Everything is really organized and it is obvious iD designs everything around fun and safety,” said Bryan Campbell, an iD Tech Camps Director. “iD is incredibly supportive so it’s reassuring knowing that the staff can reach someone at the iD office anytime 24/7.”

We expect a lot out of our summer staff, therefore we pay them considerably more than other camps. Our staff appreciates the excellent work environment that we provide – high expectations, high pay, periodic evaluations, in-depth curriculum, teaching tools, clear processes and endless summer fun. We train our staff both in person and via the web, and evaluate them consistently. There are even surprise camp visits by the iD staff throughout the summer to ensure that our high standards are being met. By the time camp rolls around, the iD staff is motivated by excellent compensation, thorough training, small class sizes and the knowledge that they are inspiring students to do big things.

Our staff is pleased to work for a professional organization. They want to work for the best. If you choose one summer camp this season, make sure it’s iD. Then sit back, relax and get ready for a summer with stellar instructors who make tech learning fun while enjoying their job. See you this summer!

March 30th, 2009 | Tags: , ,

Posted in: iD Tech Camps, Summer Camps

Web Design Entrepreneur Extraordinaire!

Keeping with our “Do Something Big” theme, Genevieve Anderson came to camp as a 17 year old hoping to learn more about Web Design & Flash® Animation but came away with a lot more. She now is thinking about majoring in Web Design in college! Not only that, she used what she learned at iD Tech Camps to improve her online vintage clothing website.

Read below to learn more about Genevieve and how she’s doing something BIG after having attended our iD Tech Camps.

iD: How many seasons have you attended iD Tech Camps?

Genevieve: This year was my first year!

iD: Where are you from?

G: Roanoke, Virginia

iD: Which iD location did you attend?

G: University of Virginia

iD: What course(s) have you enrolled in?

G: Web Design & Flash Animation

iD: What do you do for fun when you aren’t at our computer camp?

G: Besides high school, I play steel drums, travel abroad and manage my online vintage clothing business with my sisters.

iD: Does coming to iD help you improve in other aspects of your life besides technology?

G: Yes! I learned to be a better leader and to be more independent.

iD: Is iD a good place to make friends? Why?

G: Yes, everyone is very friendly and nice.

iD: What are your future goals? Will you be attending college?

G: I am applying to the University of Virginia, Emerson College, Boston College, Suffolk University in Boston, Columbia College and Roosevelt University in Chicago.

iD: How has iD impacted these goals?

G: I am considering majoring in Web Design.

iD: What’s your favorite tech gadget?

G: My cell phone — I am a teenager!

iD: What’s the #1 way you communicate with your friends?

G: Texting

iD: Why would you keep coming back to iD?

G: Because it’s a fun way to learn and get great website and graphic design advice!

iD: Any advice for future iD Tech campers?

G: Be sure you come prepared to meet new people and have lots of fun while learning some new stuff!

iD: Anything else you’d like to add?

G: Coming to iD Tech Camps helped me so much with the look and function of my online vintage clothing business! Before I came to camp, my website was pretty good. But the counselors really helped me add some great interactive features. I learned how to link pages and added Flash animation to my website. Thanks for everything!

Learn more about other iD Alumni who have gone on to Do Something Big! You can also learn more about our courses and locations.

March 27th, 2009 | Tags: , ,

Posted in: Do Something Big, University of Virginia

Tutorial: Flash Animation for Beginners

March 27th, 2009 | Tags: , , ,

Posted in: iD Tech Bloggers, Uncategorized

Orders of Magnitude : Digital Data

Here is a fun breakdown of data nomenclature. I’m sure you are all familiar with the 1st several entries but the latter ones ought to give you a run for your money, ever heard of a petabyte or a yottabyte?

Bit: An eighth of a byte*

This is the smallest fundamental size of data storage. It is a binary digit meaning that it can take the value of either 1 or 0. All computer data can be broken down to a string of these 1 and 0 (like in the Matrix, only it doesn’t fall down the screen like rain). When represented as a string it is called binary code.

Byte: 1 Byte

A single byte stores eight bits*, eight 1’s or 0’s. This octet of bits is the smallest unit for a base 1,000 order of magnitude naming system as follows…

Kilobyte: 1 thousand or, 1,000 bytes

Files not relying on on the kilo prefix are the boring ones, word docs, excel sheets, most pictures.

Megabyte: 1 million, or 1,000,000 bytes

Still pretty lame. Short videos, music. Even a pre-historic floppy disc can store a bunch of these.

Gigabyte: 1 billion, or 1,000,000,000 bytes

Finally respectable. The GB is quickly becoming the standard by which storage capacity is judged as most computer hardware will advertize capacity in terms of GB’s

Terabyte: 1 trillion, or 1,000,000,000,0000 bytes

Currently, hard drive capacity does not exceed this order of magnitude. One terabyte of data can store just under two and a half years of music played continuously. The entire library of congress can be stored on 82 terabytes of data.

Petabye: 1 quadrillion, or 1,000,000,000,000,000 bytes

Now things are getting hardcore. This is the largest order of magnitude which is any single organization claims to have the capacity of and/or handle. All of the user photo’s on Facebook is estimated at close to 1 petabyte of data. Google processes an estimated 20 petabytes of data a day.

Exabyte: 1 quintillion, or 1,000,000,000,000,000,000 bytes

The exabyte is borderline hypothetical at this point. It is theorized that, per month, the entire internet (yeah, lolcats and all) see’s about 5-8 exabytes of traffic. It was proposed that in 2006 all computer data would fit on 160 exabytes of data.

Zettabyte: one sextillion or 1,000,000,000,000,000,000,000

WARNING, WARNING you are now in the DANGER ZONE of data storage capacity. It is estimated that by the year 2010 all digital data in existence will sum up to just under one Zettabyte.

Yottabyte: 1 septillion, or 1,000,000,000,000,000,000,000,000 bytes

Trying to quantify this may make your head explode so you’ll need to sign a release before I go any further.

* a byte can actually be composed of any number of bits, however, eight is standard

As crazy as those names sound, it’s the real deal:

http://en.wikipedia.org/wiki/Units_of_information

March 27th, 2009 | Tags: , , , ,

Posted in: iD Tech Bloggers

A few helpful string and array PHP functions

I’ve been working a great deal with vBulletin, our forums system, and in doing so have had to brush on my PHP. Through the course of preparing the system for the summer I’ve come across a few PHP functions that I was not aware. Here’s a few that you may not know about:

implode: takes an array of strings and concatenates them, using $glue as a separator.

Example: string implode (string $glue, array $pieces)
$before = array(‘one’, ‘two’, ‘three’);
$after = implode(“,”, $before);
echo $after;

Produces:one,two,three

explode: does the exact opposite of implode – it takes a delimiter separated string and transforms it into an array.

Example: array explode (string $delimiter, string $string [, int $limit= -1])
$before = “one,two,three”;
$after = explode(“,”, $before);
var_dump $after;

Produces:
array(‘one’, ‘two’, ‘three’)

var_dump: unlike a typical echo, which will just print “Array” for arrays, var_dump will traverse and print the contents of the array.

Example: void var_dump (mixed $expression [, mixed $expression [, $... ]])
$before = “one,two,three”;
var_dump $before;

Produces:
array(3) {
[0]=>string(1) “one”
[1]=>string(1) “two”
[2]=>string(1) “three”
}

Of course, if you use PHP any more than casually then you already know these functions. But if you frequently jump around among web technologies you might find these useful.

March 26th, 2009 | Tags: , ,

Posted in: iD Tech Bloggers

Robotics: Not Just For Boys

I’m spending this weekend at Hilltop High School in Chula Vista, California, for the final round of qualification in the VEX Robotics “Elevation” tournament.  (For a quick rundown on the rules, keep reading.)

iD Tech Camps gave away a scholarship to the “Excellence” award winning team – Team Spyder from Poway High School!

The winning Alliance consisted of 3 teams, the rest of the matches were 2-on-2.  Check out the pictures – Robotics isn’t just for boys!

The ingenuity and enthusiasm I see at these tournaments is unbelievable.  We use the same kits in our iD Tech Camps RoboContenders class that are used for this tournament, and I can’t wait to see what this summer’s crop of roboticists comes up with!

Here’s a quick rundown on the rules, from the vexrobotics.com website:

  • Elevation is played on a 12′x12′ square field. Two alliances – one “red” and one “blue” – composed of two teams each, compete in each match which consists of a twenty-second autonomous period followed by two minutes of driver-controlled play.
  • The object of the game is to attain a higher score than your opponent alliance by placing cubes into goals, and by “owning” goals by having the highest cube in a given goal. Points can also be earned by “parking” on the platform or by “controlling” the bonus cube.
  • A bonus is awarded to the alliance that has the most total points at the end of the Autonomous Period.

March 23rd, 2009 | Tags: , , , , , , , ,

Posted in: iD Tech Bloggers

Marta's iD Journey

As a company, iD Tech Camps is fortunate enough to have a TON of talented employees and staff. In fact, without our Lead Designer Marta, our catalogs, website, and much more wouldn’t be nearly as professional and fun as they are today!

Marta turned her dream of becoming a graphic artist into a reality–and since she loved working for iD Tech Camps so much, she decided to go from summer camp employee to full-time employee at our headquarters in Campbell, CA.

I sat down with Marta and she had some great experiences and advice to bring to the table. Read on to see how Marta has gone on to Do Something Big! Here’s an excerpt from my interview with Marta:

iD: Which iD locations did you teach at?

Marta: I’ve worked as a Lead Instructor, Assistant Director and Director at the Stanford location, and I recently directed at one of our iD Film Academy locations.

iD: When you instructed, what courses did you teach?

M: Web Design & Flash® Animation and the Junior Courses (Adventures in Game Design and Create Your Own Adventure).

iD: What is your current position?

M: I’m the Lead Designer at iD Tech Camps. Every day I get to turn on my computer, open up design programs like Photoshop or grab a pencil and paper to sketch and get paid to be creative. It’s pretty awesome!

iD: What are your favorite things about our summer camps?

M: The friendships and bonds that you form with your summer co-workers. You become so close through working and spending time with them during your off hours that they become lifelong friends.

iD: What do you do for fun when you aren’t at our computer camp?

M: I like to play sports, especially basketball and running, and enjoy traveling, reading, fishing, talking with people who have a different perspective on things and learning from them, and spending time with my family in MN.

iD: Why do you like iD?

M: Within the company, there is an enormous amount of hard work, dedication and willingness to have fun that starts all the way from the top (the CEO, CFO and the managers) and flows through to the rest of the summer staff. Because of this, the atmosphere at each location is bursting with kids that are having so much fun, creating projects that they love and getting the chance to be themselves. I’ve seen so many kids go through camp and start the week off apprehensive about so many things, and then find them at the end of the week with life-long friends, higher self esteem, and a vast amount of new knowledge. In fact I still have some of the thank you notes that I’ve received from campers in the past, and each time I read them it really hits home at what an amazing experience iD and its people provide for their clients.

I’m also really happy that iD Tech Camps will now be offering a Graphic Arts camp in 2009! This is exactly the kind of exposure kids and teens need if they’re interested in the graphic arts and graphic design field.

iD: How has iD inspired you to “Do Something Big”?

M: The company, without a doubt, believes in their employees and stands behind them. Even during my first year as a summer staff, I always knew I had a support system coming from my Director, Regional Manager and the people working at the main office, whether I had met them or not, which is something that you don’t see in every company you work for these days. Fast forward three years and it was no surprise that I wanted to work for a company that motivated me from the beginning and allowed me to see how important it is to do the same for youth.

We have some more BIG news from Marta since we last checked in with her. We are happy to let you know that Marta is now engaged to be married to a former iD Tech Camps staff member, Sebastian “Seabass” Carden. Congratulations Marta and Sebastian, we wish you both the best!

Check out the full interview with Marta by clicking here.

Find out more about the courses Marta taught and the locations she worked at – this could be your chance to do something big with your summer!

March 20th, 2009 | Tags:

Posted in: Do Something Big, iD Tech Camps

The very first computer bug!

The above picture is from 1947 and depicts an actual bug that was extracted from the Havard Mark II, an early computer system built at Harvard University (few computers existed throughout the world at this point). The bug is a moth and was trapped between points at “Relay #70” and “Panel F” and was discovered on September 9, 1947, several months after the computers first realistic tests that July. The full name of the Mark II is: Mark II Aiken Relay Calculator, it was project funded by the US Navy who eventually inherited the machine.

Many people use this anecdote to explain the etymology of the term “computer bug” and “debugging” but they are actually incorrect. The term had been used for decades to describe any sort of technical malfunction. The true etymology is unclear but we can trace the term as far back as this quote from Thomas Edison:

“It has been just so in all of my inventions. The first step is an intuition, and comes with a burst, then difficulties arise — this thing gives out and [it is] then that ‘Bugs’ — as such little faults and difficulties are called”

-Edison to Puskas, 13 November 1878

As usual, all facts were made up completely

http://en.wikipedia.org/wiki/Software_bug

http://en.wikipedia.org/wiki/Harvard_Mark_II

March 20th, 2009 | Tags: , ,

Posted in: iD Tech Bloggers

Ancient (or at least older than me) Technology: The Memex

The world wide web, the public face of the internet, was officially released in 1992 in Geneva, Switzerland by CERN, a particle physics laboratory. Do take note, this is not the same as “the internet” which is a broader term referring to the interconnection of computers, dating back all the way to 1958 and a country-wide radar initiative. The World Wide Web however, refers to data that despite all its diversity can be watered down to a few simply elements: Text, Hypertext and Multimedia (Image, Video and Sound) and viewed on “browsers”. The desire to freely access those items, is a concept that dates back much farther than 1992, in fact, an intention was purposed in 1945 that closely resembles what we now know as the World Wide Web. The Invention: The Memex, the inventor: Vannevar Bush. Trying to describe how this thing works is probably easier done with a picture (worth 1000 words right?):

What is particularly intriguing is that some of the features of the Memex, such as “commenting” and “user created associations” did not become standard on the web until quite a while after its public release, though now quite common on blogs and wikis.

Unfortunately, this machine was never actually created as we were far too busy building microwaves and nuclear weapons in the 1940′s.

March 19th, 2009 | Tags: , , ,

Posted in: iD Tech Bloggers

Next Page

Blog Categories

ACCED-I Meeting Exelence On CampusThe World's Best Summer Camps

Blog Archives

CEO's Blog

Tech Bloggers