Jump to content

gw1500se

Members
  • Posts

    1,033
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. The error may be occurring somewhere else but that is the point at which PHP could not go any further. Headers MUST be the first things sent. There can be nothing preceding headers including white space.
  2. First I highly recommend you use PHPMailer. It is much easier, more robust and gives you more control. You are not checking the return code from 'mail'. It will return true on success or false on failure. Your code does not know if it is successful or not. In any case that is only half the problem. You also need to check your MTA. What are you using? Does your mail server require a sign-in to send mail. Have you looked at your mail log for any errors?
  3. Too short. You still haven't said what the error is. We are not mind readers. See my first reply.
  4. "Its not working" is NOT a helpful description. What is the error, if any? What is it doing different than you expect? Do you have error reporting turned on? Is there any errors in your httpd log?
  5. First please use the code icon (<>) in the menu for your code and specify PHP. Your question is incomplete. What error? Which line of code?
  6. I suggest that for a user friendly page you validate in both places. With Javascript the user will not have to wait for the server in order to find out there was an entry error. Very annoying. Then validate again before placing it into the database in case a user is trying to hack it.
  7. That is not something that should be done on the server side (PHP). It should be done on the client side (Javascript).
  8. I'm guessing there is a problem with the path. Make sure you have error reporting turned on. error_reporting(E_ALL);
  9. Perhaps if you posted your code (using the code icon (<>) in the menu and specified PHP) you might get an answer.
  10. No mention of multiple paths.
  11. That means it is passing 2 paths. The dot (.) is the current directory and the 2nd is an absolute path in /opt. I guess we need to see how that variable is used but I don't think it will work in a require statement.
  12. What is that colon (:) in the path?
  13. You may need to set options that the server expects. I'd use the cURL library to retrieve pages.
  14. Sorry. My post got messed up. I meant to add: After the query: print_r($conn->errorInfo());
  15. Because your query is failing so $update is false. Your query syntax is wrong and if you had error reporting on you would have seen that: error_reporting(E_ALL); You are not setting thumbnail to anything.
  16. Be more specific. This doesn't work does not help us. What error message are you getting? What is getting echo'ed? Do you have error reporting turned on? error_reporting(E_ALL); P.S. Remove the () in the echo.
  17. Have you tried this? exec("convert -resize 300x200",$targetFilePath,wankertestphp.jpg);
  18. Sorry, I don't understand what you are asking.
  19. Then add DESC to the LIMIT clause: $sqlq=$connectx->prepare("SELECT * FROM lovetree DESC LIMIT 10"); That sorts in descending order which means the rows are upside down so the limit 10 results in the last 10 rows. Note the first row returned was the last row in the table. You may want to resort the resulting array to turn it right side up, if that matters.
  20. What do you mean by "previous" 10 records? If you are trying to limit the number of records in your query use LIMIT 10. I'm not sure this is a PHP question as opposed to a MySQL question.
  21. I have no idea what that is. Use the PHP cURL library.
  22. The answer is maybe. If you parse all the 'received from' headers you can usually (but not always) figure it out. There is a time stamp at the end of each that looks similar to this: Sat, 20 Mar 2021 06:45:11 -0700 Most of the headers will have +0000 which are useless but if you find one like above, you have the UTC offset (-0700). In this case it is either MST or PDT. How you handle day light saving time is problematic.
  23. First please do not post images of your code. Post the code itself using the code icon (<>) in the menu and specify PHP. You're confused about $_FILES structure. Add the following code before the foreach so you can learn what $_FILES contain and adjust your loop accordingly. echo "<pre>"; print_r($_FILES); echo "</pre>";
  24. Use the correct require statement.
×
×
  • 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.