Jump to content

sweeb

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

About sweeb

  • Birthday 02/25/1985

Profile Information

  • Gender
    Male
  • Location
    Pennsylvania

sweeb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I took over a project and I have a need for hour interval data, but the application was coded to store it in 'h' (standard 12h time with no AM or PM delegation). I have an idea of how to adjust the rows but I'm not sure how to structure the update query. This is what I have to work with: Unique ascending ID 12h Time mm/dd/yyyy date I was thinking I could run a query that looks for values less than 12:00 in the time column and then add 12:00 to it if that Unique ID is > the biggest ID for an existing item with 12:00 - 12:59 for that specific day. Is this feasible and if so does anyone have any ideas on how to structure the update query?
  2. It sounds like you're asking how to tell whether an array is associative or not. There are plenty of examples on the php.net is_array page in the comments on how to do this http://php.net/manual/en/function.is-array.php
  3. This has no relevance to the OP at all...
  4. You can use _SERVER["QUERY_STRING"] for just the get vars and values, or _SERVER["REQUEST_URI"] to get the filename with vars and values attached
  5. Looks good to me
  6. for what it's worth, you really shouldn't be using file_get_contents over cURL even if it was enabled on your server. cURL is 10x more efficient, and has tons more options.
  7. http://dev.mysql.com/doc/refman/5.0/en/union.html
  8. $temp_name = $_FILES['Filedata']['tmp_name']; $file_name = basename($_FILES['Filedata']['name']); $file_name = str_replace("\\","",$file_name); $file_name = str_replace("'","",$file_name); $file_path = $upload_dir.$file_name; $result = move_uploaded_file($temp_name, $file_path); chmod($file_path, 777); }else{ if(!backUpFiles(file_get_contents('../events.xml'), '.')){ echo BACKUP_ERROR ; exit; } $filename = '../events.xml';
  9. Try this. On the line that says: $message = isset($_POST['message']) ? trim($_POST['message']) : ''; change that to $message = 0; foreach ($_POST as $key=>$val){ $message .= trim($key).": ".trim($val)"\n"; } This reads in all POST variables and displays them in the email body.. The simplest fix but it may not look pretty
  10. All you have to do is add the line chmod($filePath, 777); $filePath being the final path of your file after it has been uploaded.
  11. Along with upload_max_filesize, make sure you also increased post_max_size otherwise it doesn't really do any good
  12. Yeah, you can put it in a script that's used once a day-- or if a page gets used 100 times a day have a function that does it 1% of the time
  13. The reason it's not working for your other form is because your PHP form parsing file is only reading the form fields: email, message, and name. If you wanted to include other form fields you would have to grab the POST variables individually for the form-- or if you wanted it to be dynamic for whatever form you submit to it you could do a foreach loop for your $_POST array.
  14. PHP only has the capability to get the time local to the server. The only time you can get a User's time is if they specifically set what timezone they are in on your website and you do the calculation that way, by analyzing their IP address for timezone information, or by using JavaScript to get the time and passing that to a PHP file.
  15. You should check out this link: http://stackoverflow.com/questions/543926/is-it-possible-to-ajax-a-file-upload/543927#543927 Basically you can't set the enctype with AJAX so you have to do a workaround either with an iframe or flash
×
×
  • 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.