Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Mis-read the code that I thought had the error
  2. Barand is correct but perhaps you should have included that other value in the earlier query so you don't have to go look for it.
  3. IMHO - if you have your data in a well-organized proper RDBMS you s/b able to use it without creating some difficult-to-manage multi-dimensional array. Get a better handle on sql and perhaps next time you can see a solution that frees from your current style.
  4. You're talking about taking some (printed?) data and trying to read it from whatever media it is in and writing it out to a text file? Sounds simple except for the input format. That (to me) seems to be the difficult part. So - to simplify this: 1 - determine how to read the input source 2 - how to recognize the individual pieces of data 3 - compose a text string of those pieces 4 - write 5 - repeat
  5. I personally have no idea what you are doing.
  6. That is what happens when you split cases in PHP. Stick to all lowercase and this won't happen. 'internal_ref' is a mystery since there is no reference to it that I can compare to.
  7. Something that nobody has mentioned. If you want to do this work inside of a function you probably want to make it usable in multiple situations. Why then do you make it not portable by referencing an outside value that is not part of the function's header? That is just not good programming. Get rid of the $_GET reference and pass this 2nd value in using the parms in the function header. function removeItemFromQuote($itemId, $other_id)
  8. you have a nice day
  9. Look at this code and run it. The string exists in both tests but the answer that your code produces is incorrect. //Test 1 echo "Test 1:<br>"; $str = 'And click'; $a = strpos($str,'And click'); echo "str is '$str'<br> "; echo "Search result is $a<br>"; if ($a==true) echo "$a returns true<br>"; else echo "$a did not return true<br>"; //Test 2 echo "<br><br>Test 2:<br>"; $str = 'xAnd click'; echo "str is '$str'<br> "; $a = strpos($str,'And click'); echo "Search result is $a<br>"; if ($a==true) echo "$a returns true<br>"; else echo "$a did not return true<br>";
  10. I cannot move past that line of code since it will give you a wrong result in certain situations. Why would you not listen and think about how you need to change it? And as for the rest of the topic I have no idea what your title even means. "2 if statements for one hide echo"? What the heck does that mean??
  11. I don't know why my post looks like that. I didn't add any spaces. Your line of code is not doing a proper test, as I explained. OOPS my previous post has a typo. I meant to say "strpos function returns an integer result OR a boolean of false.". (It never returns a boolean of true.)
  12. First thing I would change is this: if (strpos($row["message"], 'And Click') == true) { if (strpos($row["message"], 'And Click') == true) { The strpos function returns an integer result of a boolean of false. It does not return a true value. Sure - any non-zero integer could be interpreted as true but what if your string begins with the target value? The return will be 0 which would not be true.
  13. Do you have error checking enabled?
  14. what do you mean they work until..... What happens then? What are you showing to find out what is wrong? Anything? Which line does it not get to here? Ask yourself some questions and get some answers by doing something with your code. Act like a programmer should!
  15. Still have no idea what you are doing. And the fact that you don't know what is wrong says you need to re-think what you are doing so that you can do some debugging. Start with adding some echoes to tell you if things are actually happening as you think they are. Show some values. Echo out the line numbers that you are getting to. Follow the process by showing the process, step by step.
  16. I have no idea what you are doing
  17. Is the problem IN the function? If not where in this bunch of code do you think the issue is? If it is in the function - how about showing us?
  18. Two weeks later and you still can't show us the error message or describe the problem?
  19. Already said.
  20. Without reading thru your text and only looking at the title, you should not be storing your file in a database. Simply store them in a folder (or folders) and have a table that contains the identifying info that you need. Re-think your plan.
  21. I (we?) am not going to look at ALL THIS CODE! If you want help, then show us the piece of code that has the error and point it out to us and let us tell you what need to change. OTOH - if you are looking for help to convert an html page to a pdf I think you should think of it as "converting output to pdf in place of html" and learn how to code using php and something like FPDF to accomplish that. And if that is not doable then I don't know what you've gotten yourself into.
  22. Add a "style='color:green;'" (or whatever color or value) attribute to the html that displays that value.
  23. You say 'it shows some error'. Care to pass along the exact error message?
  24. More specifically - show us the code around line 908 so we can decipher that error message for you.
  25. All of this code does not help to understand your issues. The main thing though is your switch to an apparently newer and more up-to-date host is that you can no longer use an 'outside' email as the 'from' address for mail. I do believe that most hosts now insist that you use a domain hosted by that host to use as your sending email. Consequently you cannot use gmail from your domain. Your new hosting account must be providing for you a mail service using your new associated domain name and you will have to use that. And why wouldn't you? You do have a new domain with this host, don't you? And you have moved your domain to this new host? Unless the old domain was being handled by your old host and not technically 'yours'. In that case you do have an issue. I realize that you are not a developer but you are in PHP waters when you are dealing with what appears to be WordPress app that needs to be adjusted to use a new email account. First thing to know is that there is no 'sendmail' function in PHP. That may be a WP function in which case you won't get help here unless it's from a member who does WP himself. Since you've been posted here for 24 hours and you have no response other than from me, perhaps you need to start a new clearer and simpler question on how to 'change my WP mail for a new host' or something like that. Could get you some quicker follow-up. Hope this helps
×
×
  • 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.