Jump to content

gw1500se

Members
  • Posts

    1,041
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by gw1500se

  1. First please use the code icon (<>) and select PHP so it formats your code to make is easier to read. Second you probably should be using PHPMailer for your email. It is much easier to use and gives you better control. Finally to debug this you need to make sure you have errors enabled but your insert does not contain the field 'id'. Where do you add that to the record?
  2. I think you are asking for a singleton class: class MyFetchController { $inst=null; // private constructor so it cannot be instantiated externally private function__contruct() { // initialzation code here as needed } public function Instance() { if ($inst==null) { $inst=new MyFetchController(); } return $inst; } } Any time you want that class call 'Instance' and you will always get the same instance.
  3. Start with a flow chart and develop a database schema.
  4. https://www.php.net/manual/en/mysqli.multi-query.php
  5. Try this: $queryString="SELECT cat_id, subcat_id, subcategory_title, subcategory_desc FROM categories, subcategories WHERE ($parent_id = categories.cat_id) AND ($parent_id = subcategories.parent_id"; echo $queryString; $select = mysqli_query($con,$queryString); Look at the echo'ed string to find the syntax error.
  6. Do you not know how to send and email or do you not know how to tell when the paypal API returns successful payment?
  7. When you do echo $query and post that.
  8. You don't say what the error is but that is a different problem. Start an new thread on the MySQL forum.
  9. try this: include("/home2/csi/public_html/resources/con.php");
  10. You need to determine where that file is relative to the httpd root. Require and Require_once does the same thing as include. If the path is wrong, it is wrong.
  11. It should show the absolute path (I'm guessing from the name). It should be something like '/var/www/html'. The solution is to not use absolute path but rather relative. Try: include("resources/con.php");
  12. So it is now clear that ABSPATH is not being substituted the way you expect. How is it defined and where? I don't normally use constants but somewhere you must have a "define('ABSPATH',<whatever>);" but is not executed before that include.
  13. echo ABSPATH ."resources/con.php"; Let's look at the resulting string. Then verify that is it correct and if the file does exist, has the right permissions.
  14. What is line 2 of rankings_navigation_process.php?
  15. Since you don't say what ABSPATH is, I am guessing there is a missing '/' in the resulting string.
  16. https://www.php.net/manual/en/book.ssh2.php
  17. Recheck your code to make sure there is nothing being output (including white space) prior to the headers. You don't show all your code but I'm guessing there is some output preceding the header.
  18. What part of the error message is not clear? Also don't post your code in such an unreadable format.
  19. None of those links have installation instructions. They are just forum questions. You need to use the support link on that web site to learn how to install. This is not a PHP programming issue so this forum is not really appropriate. I know Linux but this is not even a Linux question.
  20. I'm confused. Are you installing a 3rd party application or trying to access a script from PHP that you wrote? Is this a CGI script?
  21. Are you installing the script as root (sudo)?
  22. Check the permissions for /tmp. It should be (777): drwxrwxrwt. 22 root root 12288 Mar 21 14:01 /tmp Any user can write to /tmp. The 't' sticky bit handles the security issue. What ever user writes to /tmp is the only user that can access that directory/file (700) unless that user specifically chmod's something else. Also check session_save_path and its permissions.
  23. I think if you echo $todate you will get your answer.
  24. Did you echo $insertValuesSQL to make sure it contains what you expect?
  25. What you are asking for is a one-to-many table for your filename. Create a separate table for the file names and use the 'user_id' or something unique as the key that defines who belongs to that filename. Then query that table by 'user_id' and it will return all the filenames associated with that user.
×
×
  • 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.