Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. It would help if you showed the query you use to retrieve the image filenames.
  2. Be sure to reboot Apache after you make changes.
  3. It also appears you have "8M" entered 2x for that setting. Should be just once.
  4. In php.ini, see where it says "max_upload_size = 8M"? There are other settings you might need to tweak as well, such as: max_input_time (might need to be larger as it takes longer to upload the file depending on users connection/upload speed) max_execution_time (same as above) upload_max_filesize post_max_size
  5. It's not enough to just make the LINKS lowercase and with dashes. That's easy peasy to do when building the links/anchors. $link = "A New Product"; $link = strtolower(str_replace(' ', '-', $link)); echo $link; // a-new-product Your app has to RESPOND to those lowercased/dashed urls as well, which you haven't told us or shown us how you are doing that. Right now they respond to the upper cased links with spaces in it because you have it coded that way somewhere.
  6. What does $status look like after you do this: $status = array_map('strval', $var['receiver']) + array(0); I'm not sure what that array(0) is supposed to do. Shouldn't those be square brackets and why are you adding that anyway? Besides that, it doesn't look like your database is normalized for your statuses. It seems those should be IDs instead of their names.
  7. Yeah, the style definitions go in the stylesheet. The code he is showing you is how to apply the correct style class to your calendar's day elements depending on the conditions if there are slots available, or not.
  8. Although you do run the risk of ticking them off. Personally I'd use placeholder data to demo a product to a specific company that you haven't been contracted by. It doesn't need their actual prices, etc., to show them what it would look like with their data.
  9. So...what trouble is it giving you? What's the problem?
  10. To redirect with javascript, it's "window.location = the_url", not "location" by itself. However, it looks like you really should be using php to redirect...on the page that receives the form data (once it's saved in the db)
  11. Sorry, I see you are posting with ajax. I'd suggest trying to get it to work without the ajax and then try adding it in. It would be helpful if you did a print_r($_POST) at the top of your page receiving the form data to see if everything was POSTed correctly. It might also be useful to use jQuery's built in method for building the form data to submit instead of building your own. data: $('#contact').serialize()
  12. Where are you submitting your form to? It should be the php file that you posted above. According to your form's action attribute, you are submitting the form data to "#". <form id="contact" name="contact" action="#" method="post" style="width:600px">
  13. Try this just before your query: //set a default value for the subcategory. This will be used if no subcategory exists in the URL $subcategory = 'Computing'; //Check if the subcategory exists in $_GET, and it contains a value. If it does, use that value for the subcategory. if (isset($_GET['subcategory'] && trim($_GET['subcategory']) != '') { $subcategory = trim($_GET['subcategory']); } //Perform the query using the subcategory. Either the default, or the one passed via the URL. $sql = "SELECT * FROM categories WHERE Category = '$subcategory' ORDER BY subcategory ASC";
  14. Another thing, you are assuming everything will work by the way you've written your code. You need to test things with code, like how do you know if your db connection actually connected successfully? How do you know that your queries aren't failing since you don't test for that? You just make a query and move along. Just about everything in mysqli has a method to test to see if it was successful or not before continuing on. http://php.net/manual/en/mysqli.quickstart.connections.php Check here to see how they test to see if the connection was successful and showing the errors if it wasn't. Same with performing a query: http://php.net/manual/en/mysqli.query.php
  15. This stuff should be obvious with error reporting, your IDE, etc, but you're missing a quote where you're connecting at the very top of your script
  16. Most chat applications that I've seen don't sent HTML back. They send JSON (which is a lot more compact), and then the javascript builds the HTML based on the values from the JSON data and inserts it into the DOM. The timestamp can easily be a field in the JSON data.
  17. Personally I'd do it with javascript. Each request for the new posts should include a timestamp of when that batch was received. Then when the data comes back just highlight everything > previous timestamp.
  18. It would probably be much better for the user to be able to see the times available directly on the calendar within each day rather than having to hover over each day to see it. They just want to know what's available so they can book and appointment, right? It would also be a lot more user friendly to just have a form that pops up when clicking on a day (actually clicking on the available timeslot they want to book for) to create an appointment. The same popup can be used for all days, and you can grab the year/month/day/time they selected from the calendar depending on what they clicked on.
  19. Surrounding the date with # is how you insert a date in MS Access. Not sure if it needs to be quoted or not though.
  20. Ah, yeah that helps glad you got it resolved!
  21. achievement_types (lists all of the various achievement types) -id -name achievements (stores each users achievements) -id -user_id -achievement_type_id
  22. Is there a good reason why you need to store these variables in my.cnf and apache.conf, instead of in your app?
  23. I'd just use ajax to retrieve the content. You could start with your first tab populated, and show the tab. The other tabs would be empty. When clicking on the other tabs, check to see if they're empty, and if so retrieve content via ajax. If not just display the tab normally. If user clicks on same tab again, it will already have the content and not fire the ajax request a 2nd time if (this_tab_content.html() == '') //nothing in tab yet { //fire ajax to retrieve content for this tab //success: function(response) { // this_tab_content.html(response.tab_html); //on ajax success, replace content of tab with resulting html //} }
  24. In the docs, there is a 'hide' method to collapse. You could probably just target the anchor tags within your collapsible with an onclick event to trigger the 'hide' method.
  25. You can ping the IP and see if you get a response. Sounds like you are doing something you know isn't ok if you need to vary the IP addresses you are scraping from to try to mask yourself.
×
×
  • 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.