Jump to content

MDCode

Members
  • Content Count

    640
  • Joined

  • Last visited

  • Days Won

    1

MDCode last won the day on April 15 2017

MDCode had the most liked content!

Community Reputation

33 Good

About MDCode

  • Rank
    Prolific Member

Profile Information

  • Gender
    Not Telling
  1. MDCode

    Basic problem with isset

    If that is the entire file, you forgot session_start();
  2. MDCode

    Java script not running

    If you don't have access to the site, why are you trying to track things on it? Have you checked the source of the page?
  3. MDCode

    Basic problem with isset

    Sorry about the above post ^. Had to go and edit timed out. What Barand was saying was to return the session to the JQuery in json format since that is what your dataType is: $test = $_SESSION['test'][$userAnswer]; echo json_encode($test); Then JQuery will receive the value of $test as the data var in success: function(data) { So basically just change your PHP to that and see what the result of the append is.
  4. MDCode

    Firefox works IE doesnt - Images

    Try adding: display: inline-block;
  5. MDCode

    Is There a "Sure" Way to Make Money Online?

    There's no "sure" way of getting traffic. You just need to advertise your idea well. No one can find you if they don't know who you are.
  6. MDCode

    Is this possible?

    The SQL part is easy. The map part will span past SQL. The query will depend on how much data you plan on storing, and how you plan to constantly store and update the location data to know how far away the aircraft is and what position in height they are at.
  7. MDCode

    redirect after script processes

    Based on how you're describing it, I'm not even sure that's possible. You want the file to download on a page, and on that same page serve a redirect? If so, that's not possible.
  8. Untested <?php // Base path starts with attachments $upload_path = "attachments/"; // Check if the year directory exists, if not, create it if(is_dir($upload_path.date("Y"))) $upload_path .= date("Y")."/"; else { mkdir($upload_path.date("Y")); $upload_path .= date("Y")."/"; } // Next, check the month by word if(is_dir($upload_path.date("F")) $upload_path .= date("F")."/"; else { mkdir($upload_path.date("F")); $upload_path .= date("F")."/"; } // Next check the day of the month with leading zeros if(is_dir($upload_path.date("d")) $upload_path .= date("d")."/"; else { mkdir($upload_path.date("d")); $upload_path .= date("d")."/"; } echo $upload_path; ?> That should get your upload path created if it doesn't exist, or use it if it does. The path should be accessible through the $upload_path variable.
  9. MDCode

    Session timestamp capture for countdown

    It all really depends on what kind of timestamp you want. <?php session_start(); if(!isset($_SESSION['start_time'])) $_SESSION['start_time'] = time(); ?>
  10. The backticks should not be causing that error. Try this: SELECT SUM(`reservation_pax`) FROM `reservations` WHERE `reservation_time` = '8:00:00' AND `reservation_date` = '{$_SESSION['selectedDate']}' AND `reservation_hidden` ='0' I posted that on my server and no syntax errors occurred. Just know that trusting the integrity sessions is bad. You should properly escape that as well.
  11. What I put in the query are not single quotes. They are backticks. Backticks are used in queries to distinguish table names/column names
  12. MDCode

    Getting Handset Device Name

    The JavaScript itself is minified. No matter how you post it here, it's not readable.
  13. When you insert the value into the table, use mysqli_real_escape_string. Right now you are using $_POST['message'] instead of $blog. Also, you are overwriting $blog after using mysqli_real_escape_string() so you will have to get rid of the line that says $blog = $_POST['message']
  14. I'm not sure how your date is set up in the database but you can just add on to your WHERE clause like this: $result = mysql_query("SELECT SUM(`reservation_pax`) FROM `reservations` WHERE `reservation_time` = '8:00' AND `date` = 'Enter some date here' "); That will get the sum of guests where the reservation time was at 8:00 and the date was whatever you enter.
×

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.