Jump to content

The Little Guy

Members
  • Posts

    6,675
  • Joined

  • Last visited

About The Little Guy

  • Birthday 07/22/1986

Contact Methods

  • AIM
    verve20
  • Website URL
    http://phpsnips.com

Profile Information

  • Gender
    Male

The Little Guy's Achievements

Prolific Member

Prolific Member (5/5)

6

Reputation

  1. I have tried that, but the drive doesn't show up in there.
  2. Is that supposed to help with "NTLDR is missing"?
  3. 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;
  4. 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.
  5. 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...
  6. 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)?
  7. 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.
  8. 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?
  9. 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
  10. I tried to start the computer using the hard drive, and I get "NTLDR is missing"
  11. Here is one I found that I like. http://www.kimai.org I installed it, now I'm testing it.
  12. Via settings. No.
  13. 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.
×
×
  • 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.