Jump to content

phppup

Members
  • Content Count

    603
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phppup

  • Rank
    Prolific Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,161 profile views
  1. I stayed surfing the web again (someone should unplug that thing) and went down the rabbit hole, again. The code above displays lines of character text. Uncommenting the two header lines created a black screen with a black outlined square. How can I get a the image to display? Can I use this method to display multiple images? Will this provide a layer of security by eliminating a visible url to the image?
  2. Either the code or it's creator needs to take a nap. I get cranky when I'm hungry. Empathetically, I accessed some code this afternoon that had worked fine 2 months ago. But this afternoon it was obstinate about running. It took 3 hours before I discovered that TWO conditional statements had been removed with comment tags. That darn code must've gotten active after I tucked it in and turned out the light. There's no other rational explanation. Pleasant dreams.
  3. You need to understand what your code is saying. The first version says: attempt this, attemp that, try to send mail, try going to the Thank You page. There are no indications or notifications of which success and which fail. The alternate version directs the process to EITHER go to the Thank You on success, or indicate failure. It's safe to safe the email is FAILING in all attempts. You just don't restrict it from going to the Thank You page on the first version. I would hardcode and see where that takes me. Also don't forget my initial statements about spam filt
  4. @kicken Using file_get_contents($image) gave me a page with characters and LOTS of black diamond-question marks. That's what got me into this mess, and lead me down a path that had suggestions on the WWW to use everything from decode_base64/encode_base64 to bin2hex etc. I think all my images are now inverted, upside-down, and mixed between Latin, Arabic, and Japanese characters. LOL It seemed like a good idea at the start. Maybe I'll just back away from the path verrrry slowly.
  5. Take a break and get back to basics. Did you try @gw1500se suggestion? Add $state= "Test state"; one line above the culprit code line if the email is successfully processed with that text value, then you can resolve the issue with a comparison condition afterward.
  6. In your HTML, the drop-down for states which provides the value for $state is DISABLED. Why?????
  7. I would hardcode the troublesome header and see what happens. Maybe the code doesn't like something in $headers = "From: $email_from" . "\r\n"; PS: I did notice the command sending the user to the "Thank you" page. You could expand it and do something like Gotta go get a COVID shot. Good luck.
  8. Then we did it? Hurray!! Glad we could help. (Don't forget to remove or comment hide the error reporting)
  9. If you put the first few words of a notification into a search engine, you can generally begin to find an understanding (and hopefully a solution). The last item of the message that provides "line #" is referencing the line in your CODE where the error occurred. (Taking into account that sometimes the error existed but didn't cause a problem until this point, the line number is accurate.) Depending on your code editor, the line numbers are available, although counting to line 21 isn't nearly as difficult as finding line 642. LOL. (an empty line is still a counted line) Make sure
  10. Do you want this?? print_r($array_name);
  11. As previously mentioned, YES, place some functional validation to determine IF the system sent the email. Something like This will not only help you during development, but also benefit the user when operational. And, as often recommended, turn on ERROR REPORTING by placing this immediately after your opening PHP tag <? (if you haven't used this, just do something blatantly wrong and then run the page to see the result) ** Remove it BEFORE production ** Aside from your CODE, other variables can be in-play with email. Spam filters are notorious for
  12. @kicken Thanks for clarifying that for me. Thankfully, my understanding wasn't/isn't that far off, although my terminology may have been a little murky. So how can I display an image as just 1s and 0s in a browser? And to my REAL question, what is the preferred/default method of interpretation for PHP? (Am I correct that images are essentially meaningless to PHP for display purposes? ECHO $img; is worthless [until HTML intervenes to help translate with an <img> tag] It's like a memo being passed thru the United Nations assembly. It is written in plai
  13. Unfortunately not a single search result had offered a sentence that elaborates to say "...displays the contents in language XYZ." Nor does any site elaborate on that manner regarding "creating an image", "image code", et al. I assume it all begins with binary, but references to hex, base, etc. seem almost arbitrary without a foundational resource. Ya got that right. But i think I've been understanding and learning more, thanks to the help I've gotten here. At this point "the forest" will probably take care of "the trees" since I'm hopefully disarming ill-int
  14. But might it be a start? Stopping even a single 'bad actor' seeems worthwhile. Still, if I echo file_get_contents($image_path); what am I seeing? ASCII? Hex? Other? How do I clean it up to view it properly (in its entirety)? Is it the same for jpg , png, bmp, etc?
  15. Does someone like this seem like a practical and effective effort? Limitations? Potential problems? Sensible?
×
×
  • 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.