Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by MDCode

  1. If that is the entire file, you forgot session_start();
  2. 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. 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. Try adding: display: inline-block;
  5. 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. 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. 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. 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. 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.
  15. <link rel="stylesheet" type="text/css" href="http://pickmysmoker.com/style.css" media="screen" /> <style type="text/css"> #maincontainer{height: 1435px;} #content{padding: 0 20px 10px 20px;} h4{padding-top: 20px;} .article{font-size: 16px;} #sidebar{margin: -1070px 0 0 630px;} #review-text{ font-size: 14px; font-style: italic; } </style> That is part of the page source of your website. There is some styling in a file called style.css and there is what is wrapped in the <style></style> that I also posted
  16. $phone = $_POST['phone"]; You have a quote (") instead of an apostrophe (')
  17. That setup is very unorganized. It would take too much time looking back and forth to see what's happening in your code. 1: Indent your code. It's so hard to read. 2: Functions should be kept in a separate file. 3: Instead of using switch functions that just call functions, why not just layout your registration? <?php // Process registration ?> <html> <head> <title>Registration</title> </head> <body> <!-- Just put your form here --> </body> </html> My guess would be these lines here: if(!$connect){ die(mysql_error()); } $connect is not set in your connection.php
  18. if (!(empty($_POST['name'])) Extra ( after the !
  19. That js file has been minified. It's not in a readable format.
  20. If you want it accessible through a form and still seen in your span, you'll have to add it to a hidden input. <input type="hidden" name="grand_total" value="grand_total_amount_here"> Either way it will still be editable by a user. The only way to do it securely would be to follow mac_gyver's advice.
  21. The code I posted is SQL, you will have to find the code that is getting your information from the database.
  22. I didn't exactly get what you wanted after your second post. The first post sounded like you wanted guest and table count based on time, and your second post sounds like you want the total of `reservation_pax` based on `reservation_time`. You could probably just gather that through SQL: SELECT SUM(`reservation_pax`) FROM `table_name` WHERE `reservation_time` = '8:00'
  23. If you are submitting the form without JavaScript, the way you are doing it is not possible. Why not just wrap it in a <form>?
  • 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.