Jump to content

The Little Guy

  • Posts

  • Joined

  • Last visited

Everything posted by The Little Guy

  1. I have tried that, but the drive doesn't show up in there.
  2. It might be easiest to have a configuration, that tells PHP how the textbox should be formatted (min/max length, numbers only, alpha only, etc.). It would/could look something like this: $config = [ "myField" => [ "max" => 15, "min" => 6 ] ]; // Array is php 5.4 syntax function validate_field($field_name, $value, &$error){ global $config; // don't use global, I am for this example though $settings = $config[$field_name]; if(isset($settings["max"]) && $settings["max"] > strlen($value)){ $error = "Too Long"; return false; } if(isset($settings["min"]) && $settings["min"] < strlen($value)){ $error = "Too Short"; return false; } $error = ""; return true; } $errors = []; foreach($_POST as $name => $value){ if(!validate_field($name, $value, $error)){ // The field wasn't valid $errors[] = $error; } } if(count($errors) > 0){ // The form has errors echo implode(",", $errors); // Show form again exit; } header("Location: to success"); exit;
  3. I don't know if I really like that idea. I can do it, but I would like to stay away from it due to the way the site works.
  4. I did something similar to this, what I came up with was something like this to fix my problem: -- I would make end_time the length of the track which could look like this: '00:02:30' for a 2 minute 30 second song. select sum(time_to_sec(timediff(end_time, '00:00:00'))) / 60 / 60 as hours from my_table group by artist_id; So, maybe store the values as "times" Then, using php I did this: <?php function lz($num){ return (strlen($num) < 2) ? "0{$num}" : $num; } function convertTime($dec){ // start by converting to seconds $seconds = $dec * 3600; // we're given hours, so let's get those the easy way $hours = floor($dec); // since we've "calculated" hours, let's remove them from the seconds variable $seconds -= $hours * 3600; // calculate minutes left $minutes = floor($seconds / 60); // remove those from seconds as well $seconds -= $minutes * 60; // return the time formatted HH:MM return $hours . "h " . lz($minutes) . "m"; } echo convertTime($row["hours"]); I hope maybe this might get you on the correct path...
  5. We are going to be using Stripe so people can make payments to us. If you're not familiar with how Stripe works, here is the breakdown: JavaScript is used to build a one time token, and make some tests. If the data passes the JavaScript tests your information is sent to my server to use the Stripe API that actually makes the payment You get a json result back that is parsed back into php. If the charge fails an Error is Thrown that you need to catch If the charge is successful, then you get a confirmation id that you can save in your database to look it up later or do whatever you need with it. So that is how Stripe works. My question is, when an error is thrown, I want to redirect the user back to the form to fix the error, but I don't want to make them fill out the form again. What is a safest or most secure way to do this (when we go live we will be using SSL for HTTPS)?
  6. I don't really know the pro or the cons, and it just seems like it is an easier approach than to store the files in the file system, and it seems like it would be a little more secure.
  7. So, I have two database tables, and each one I would like to store files in. One of the tables will store fairly small PDF files, probably around 1MB and smaller. The other table would store zip files. What are your thoughts about doing this?
  8. Netbeans ​​Has Git/SVN/Mercurial/FTP built in. PHP/HTML/CSS/JavaScript/jQuery/Java/etc. auto-complete Project Management Other random features GitHub / Bitbucket Bitbucket has free private repositories PhotoShop Best photo editor, and has more tutorials than any other graphics software Nginx Easy to install, high speeds, easy to configure. Overall AMAZING Google Chrome Favorite browser to use/test with. Spotify Need some music to listen to while I do my stuff. Terminal or Putty This one depends on the OS, Linux = Terminal; Windows = Putty Facebook When I want to rest my eyes for a moment, I like to go to Facebook to see what everyone is up to Stakoverflow
  9. I tried to start the computer using the hard drive, and I get "NTLDR is missing"
  10. Here is one I found that I like. http://www.kimai.org I installed it, now I'm testing it.
  11. Is there a good free open source PHP driven time tracking and project management tool that I can download and install on my server? Some main features I am looking for are: Time Tracking Project Management Invoices USD pricing I have been looking all day, but all the ones that I find use Euro's for invoices, and I can not have that.
  12. I have 2 hard drives in my computer tower; each hard drive has an OS on it: Main hard drive has: Windows 8 (SSD) Other hard drive has: Windows 7 (IDE) I would like to view the files on the the second hard drive (The one with windows 7 on it). I then want to copy some of the files I have have on it to my windows 8 hard drive. (php files mostly and maybe some images). Is there some software or something that I can use to do this without having to make the second drive become my primary drive and then boot into it?
  13. http://developer.ubuntu.com Cool! you can write apps in more than one language unlike all the other OS's! Here is the list on the developer site: C and C++ C# Java Javascript Python QML Vala
  14. So, I was reading some news, and saw that Ubuntu is planning on releasing "Ubuntu for phones" this month, I don't think it has a name (maybe), but I am kind of excited! http://www.ubuntu.com/devices/phone This Phone OS has its own SDK, and well it doesn't run android apps so IDK if it will become popular because of that, as Android already has a large following. Do you think people will design apps for it? I guess the download that will come out this month will be for Galaxy phones, but it doesn't sound like a "Full Release" http://www.nawdog.com/?p=37 What are your thoughts on this?
  15. Okay guys, thanks! I am doing a live preview, so I wrote it in JS originally, I then decided to do that for everything, then then you guy convinced me that how I was doing it isn't good, so I then wrote a php version of the formatter as well. It is now being formatted via php when the page loads. Thanks for the input.
  16. I wrote it in both places, because I submit the data using ajax, then format what was in the text field using JS. I guess I could submit it then wait for php to format it and return that back...
  17. Okay, But... links will more than likely contain links to outside sources, and Google does have a sitemap of my site plus, it is in my robots.txt file of all the urls. According too Google you should add this to your robots.txt file: Sitemap: http://mysite.com/sitemap.txt
  18. On my site, I take data from the database and display it directly on the page (without formatting it), if you view the page's source, it looks like this: The sun is nearly a perfect sphere. The mean radius of the sun is 432,450 miles (696,000 kilometers), which makes its diameter about 864,938 miles (1.392 million km). It is difficult to get a true feel for how big it is because nothing in our daily life comes even close. But we can use objects that we are familiar with to provide us with a scale that can allow us to at least see how big the Sun is compared to the Earth and the other planets in our solar system. If you think of the Sun as a basketball, the Earth would only be the size of the head of a pin. * If the Sun was hallow, it would take about one million Earths to fill it. * The Sun is 110 times wider than the Earth. So 110 Earths would fit across the diameter of the Sun. * The mass of the Sun (the amount of stuff) is 330,000 times that of the Earth. * The mass of the Sun accounts for 99.86% of the total mass (total amount of stuff) in the solar system. Once the page has loaded, JS then runs over the sections and formats it (bold, lists, blockquotes, italics, etc.). I like doing this, because then I only have to write the formater once in JS, and not twice (Once in JS and once in PHP), but does this hurt with SEO? Also, is there anything else I should think about in doing this, this way?
  19. So, I am thinking of getting a new graphics card, but I have no idea what types of things to look for. I want something decent but not amazing. There are two games I mainly want this for: 1. StarCraft 2 2. The new SimCity I can play the two games with my current card, but I need to keep the graphics down about half way on them. I would like to be able to max the graphics on these games. So I was hoping this would work: http://www.newegg.com/Product/Product.aspx?Item=N82E16814130827 Any thoughts, or what is a better bang for the buck?
  20. What are you final thoughts on getting the game? Over all I liked it enough to pursue getting the game! One of the screen shots I have seen made me feel like it was a video game of "Mr. Rogers Neighborhood".
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.