Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Since it's being put into an array within a loop, you probably need to access each array using the index, like $info[0]['name']
  2. Put the url to the delete function there, not CALL the actual delete function. Just like you are for the first button on the same line where you give the url to the function, editaAtividade.php?id=
  3. All you'd do is output the HTML necessary to generate the tabs that the jquery tabs plugin requires along with executing the javascript. Your question is fairly broad and I'm not sure what it has to do specifically with PHP.
  4. $this->removerAtividade($id) Seems like your code is telling it to. It's executing a function here, not creating text for a link href.
  5. This can be done purely with CSS and no other coding. http://www.w3.org/Style/Examples/007/evenodd.en.html
  6. You're loading jQuery, but not using any of its powerful functions which would make your code a lot simpler and shorter. Why load jQuery if you're not going to use it?
  7. I usually just use git for that, but look into rsync if you aren't already using git.
  8. post your whole query.
  9. Well, yes. sprintf() is converting the %[identifiers], which mysql is also using. So don't use sprintf() when using those mysql functions that contain %[identifier]. If you use prepared statements for your queries, this will be a non-issue plus they are way better to use anyway.
  10. I can see that working using the auto_increment ID only if they don't allow deleting entries, otherwise I wouldn't count on (entry - 1) being the correct ID.
  11. Using ; like you are on the $(document).ready()
  12. When the form is submitted and the data processed, just redirect back to the main page?
  13. Why not use sessions instead of cookies?
  14. http://api.jquery.com/closest/
  15. That would depend on if you're using pure javascript or jQuery or some other library?
  16. A CURL request is basically a normal web request, so the site will send whatever headers it normally sends as if you were visiting the site in your browser. Nothing special needs to be sent on their end like you do with the Access-Control-Allow-Origin using AJAX for cross-site requests.
  17. You can just store the questions in an array and use shuffle() on the array. You can also use ORDER BY RAND() in your sql query, although I've read it's not as good in the past.
  18. Maybe it's just the formatting, but most of that code looks really broken due to things showing up on the next line where they shouldn't be. Stuff like: class // Instantiate Also, try setting more of the parameters like here: http://ctrlq.org/code/19589-send-mail-php
  19. If the email needs to be sent each and every time the submit button is clicked to create the initial query, then just have that code also send the email so there is only one step. If it's optional to send the email, then a 2nd step would be necessary similar to what you described.
  20. Just hide the left/top/right border of the form fields
  21. Git is invaluable and easy to learn/use. Yes, you should learn it. It can save you from a catastrophe
  22. Once you grab the page $content, use simple_html_dom to parse it and grab what you need, kinda like how you would with jQuery. http://simplehtmldom.sourceforge.net/
  23. Wordpress isn't a framework, it's a standalone application. You can find info from their docs: http://codex.wordpress.org/WordPress_APIs
  24. All the output buffering does is send the output once everything has been processed instead of "real time"...or "linearly, as processed". They really should take about the same time for the end user to receive both. The same calculations, as you put it, would take place in both scenarios. The only difference using buffered output is the users browser receives the entire document at once instead of like sending the header, waiting for something to be processed and then sending that out. So instead of the page being "drawn" in chunks, it's all done at once.
  25. You can use either. file_exists() works on both files and dirs and I usually use it for both cases. But yeah, is_dir() would obviously work for this. To get the filename/path without extension, why don't you just grab it before you add the extension? $raw_file = UPLOAD_DIR . uniqid(); $file = $raw_file . '.png'; ... print $success ? $raw_file : 'Unable to save the file.';
×
×
  • 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.