Jump to content

ginerjm

Members
  • Content Count

    4,768
  • Joined

  • Last visited

  • Days Won

    63

Everything posted by ginerjm

  1. You have to be kidding. This post is meaningless to almost anyone who reads it. I understand that there is a language problem but you don't even attempt to make clear what you are using, what you are doing nor what any of your code even looks like. Questions: What is "getevent()"? What is "Mage"? Where is this printing taking place? What is "checkout_cart_product_add_after"? A function you wrote? Part of a package you are trying to learn about?
  2. I'm curious as to why you have this need to create individual spreadsheet (files) when you already have the data in a database from which you are able to draw this info from. Are you creating these files for others to use outside of this data-gathering app? And do they do updates within these spreadsheets that you then have to somehow apply to your nice-and-neat already-maintained database?
  3. AND in my first post - did you RTFM on those two functions that you are mis-using?
  4. Do you mean a string value saved in a var or do you mean a valid date value stored in a var? Bit of a difference. Care to elaborate?
  5. Do you have php error checking enabled? Did you read the manual on how to use the date() and strtotime() functions? I think you have bad values in use and that is probably causing your discrepancies.
  6. One thing is to verify that the input value has the content that you expect. Another is to use prepared queries that will remove any threats from using user inputs.
  7. Never sanitize input data? Why on earth would you NOT do that? Hackers can put anything into an input field and your script has to be prepared to handle it or face the consequences. The rule might be 'never alter input'. But for sure you have to sanitize it to avoid damage to your database or whatever your script is doing with the data.
  8. That too is news to me.
  9. Macgyver - great post. But - I don't get the purpose of #7. When I'm done I simply resend the screen back for another set of input or with the results of the logic process. Don't understand your need for a get request.
  10. How about this query? $wpdb->query( 'DELETE FROM '.$wpdb->prefix.'kudos_email WHERE kuemid IN($del_id)' ); Your query statement has a Where clause that looks like this EXACT string: 'WHERE kuemid IN($del_id)'. That is not what you want. Try using double quotes instead of single. ALSO - my research does not show any valid use of the IN operator with an array of args. You need to do an implode on your array to add the commas and use that resulting String value.
  11. Yes I did. Wasn't looking at a UL tag to contain that code.... Probably cause of the layout of this mish-mash of Html and php interspersed.
  12. Two questions: 1 - What do you mean by "read navigation"? 2 - Your php code has a lot of functions but no "main line" code that makes use of them. Perhaps that is why you are posting here?
  13. How to add the echo statements? If you don't know what that is, I'm afraid you are in over your head.
  14. Have you added any debugging code to see what the script is doing? Obviously it is going somewhere you don't expect so add some echos to display what the code is seeing and operating with.
  15. Which commands are you having a problem with? The db interface perhaps? If you tell us what we can point you at some references that will help you learn how the code has to be changed.
  16. Some of us have no f..... clue what is going on here.... The whole topic was confusing form the title on down....
  17. Show us the code for: 1 - your sql statement itself 2 - the code that 'binds' or assigns the values/vars to the parms being used in the sql statement There should be an equal number of values and parms in this code. 3 - the execute
  18. I've shown you how things could be written better. Good luck.
  19. Regarding your edits: if (ctype_alpha($name) === false) { $errors[] = 'name contain letters!'; } Do you WANT letters or not? As a newbie how about this: if (!ctype_alpha($name)) $errors[] = 'Name must be all alphabetic'; And this could be different: if(empty($errors)) { if (mail('XXXXXXX@gmail.com','contact form',$message, 'From: '.$email)) { header('Location: index.php?sent'); exit(); } else { echo "Message not sent"; exit(); } } Note the use of separate physical lines for each line of code. Combining them makes for troublesome reading down the road. Trust me. Also - the php mail function is not the greatest mail tool. It only offers a boolean response and that can be wrong without you knowing it.
  20. First - do you know that what you have so far actually works??? Your 'from' address has to be valid for the mail server to use. You're allowing the user to provide it which is probably not what you want to have happen. A bar? You mean like a moving 'progress' bar? Or just a 'line' of text?
  21. IF you don't understand what I said above, take a fresh look at the code I provided you earlier and read it carefully and try to understand what you are doing differently.
  22. STOP creating NEW VARIABLES!! That is your problem here!
  23. Or you could have just said: $cat_name = str_replace('&', 'and ', strtolower($cat_name)); No need to define arrays for this purpose nor to create a second field to hold category name.
  24. So - however you accept a request from any person on your site to "see" a profile page - you need to simply check if they are signed in. If that means they have to have a certain $_SESSION element set, then all you do is call isset() for that item, no? What is the question about session_start all about? Obviously every script you execute should begin like this: <?php ... ... session_start();
  25. I don't understand any of this discussion. But the worst part of that lack is that I don't see any usage of "session_start()" in any of the many code samples. So my question is "What is the real problem"? Perhaps you could just explain what you are trying to accomplish?
×
×
  • 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.