You may have seen some information about Apple offering to replace your iPhone screen if you take it to an Apple store and have a "Genius" do it for you. Lets go over some of the details of this and why this is not the best option. First off is the cost to do this which does not include your time or the mileage to get to an Apple store. This repair will run you $199 for the 3G or 3GS even if just the Touch Panel is broken. The Apple "Genius" will take it in the back room and pull the old screen out probably with a case opener (XX1521) tool or suction cup (XX2373) and put a new screen in it for you. This is a 10 minute do it your self repair that will run you $199 from Apple. At DirectFix we carry the same screens, tools and free online videos you need to do this yourself. You do not need to be a "Genius" to do this just watch our free videos below. The 3G complete screen we carry (IP-2164) is only $99 and the 3GS complete screen we carry is only $149. That will save you $50 to $100 from what the Apple store will charge you. Now I am no "Genius" but I can also do some basic math and I do not know many people that make $199 for 10 Minutes of work. Also if you have a Jailbroke iPhone Apple will not fix it for you no matter what. So your choice is to spend $199 at the Apple Store for 10 Minutes of work or save the money and order the part from DirectFix.com and do it yourself.
Another note if you are a little more technical and have more time on your hands there are even cheaper solutions. If you only broken the Touch Panel on the 3G or 3GS this part can be replaced by its self. There are some additional tools and and adhesive kit needed but the Touch Panel only runs $30 for the 3G and $40 for the 3GS (IP-2320). That would then save you $160 to $170 from the price that the Apple store charges. As you can see there are ways to save money and doing a little research can go a long way.
iPhone 3G Complete Screen Replacement (LCD & Touch Panel) Directions
iPhone 3GS Complete Screen Removal & Reassembly Directions IP-2322