Jump to content

gw1500se

Members
  • Posts

    1,029
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by gw1500se

  1. 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.
  2. What is line 2 of rankings_navigation_process.php?
  3. Since you don't say what ABSPATH is, I am guessing there is a missing '/' in the resulting string.
  4. https://www.php.net/manual/en/book.ssh2.php
  5. 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.
  6. What part of the error message is not clear? Also don't post your code in such an unreadable format.
  7. 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.
  8. 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?
  9. 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.
  10. I think if you echo $todate you will get your answer.
  11. Did you echo $insertValuesSQL to make sure it contains what you expect?
  12. 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.
  13. You also forgot to use the code icon (<>) and select PHP. Please edit your OP.
  14. You can't. At least not from PHP directly. PHP is server side. If I understand what you want, you can create an app or javascript using ajax to transmit the data to a PHP script but you can't access the data from PHP. The transfer must be initiated from the client side. All PHP can do it put up a page requesting that data from the user.
  15. I'm confused by what you are trying to do. COUNT() returns the number of rows that match the query criteria. Is that what you really want? Why put it in a loop? The reason the 2nd one works is because it actually returns a row of data.
  16. Since you do no error checking after the query, that is what happens if no rows are returned due to either and error or nothing in the database meets the WHERE clause.
  17. You probably want to do a redirect from http to https. While this can be done in PHP (not recommended) is it better to do it with httpd controls. Assuming you are running Apache make sure you have the rewrite module loaded. Look for this line in your httpd.conf file: LoadModule rewrite_module modules/mod_rewrite.so If it is not there, add it. Then create the following '.htaccess' file in the directory that contains the pages you want to protect: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] Restart httpd and you should be good to go.
  18. Start by changing that column to data type TIME. That stores it as hh:mm:ss. Then use: $totaltime=strtotime($time1)+strtotime($time2)+... ; echo gmdate("H:i:s",$totaltime); // If you want it back to hh:mm:ss or set whatever format you want.
  19. Also does each call output a single line or all lines? You need some <tr> and <td> tags somewhere which is why ginerjm asked about the HTML code.
  20. You just have to make sure the date formats match. MySQL only uses yyyy-mm-dd, so: $curdate = date("Y-m-d");
  21. First, don't embed your PHP code like that. Separate your HTML from the PHP code. Second, don't use * in your select. Extract only those variables you plan to actually use. To do what you want, you need to create a form that submits your data when you click one of the buttons. See this article about using forms and passing data to PHP.
  22. First please use the code icon (<>) and select PHP for your code. It makes it much easier to read. I'm not sure but I think you need to change your loop to this: $rows = $resultset->fetch_assoc(); foreach ($rows as $row) { $var_course_id = $row['course_id']; echo "<option value='$var_course_id'>$var_course_id</option>"; }
  23. It is not clear to me what you are really asking. If you just want to use an IP address in the URL, that is not unusual. $url = "http://127.0.0.1/index.php";
  24. It can be done and is a routine thing. Here is a simple example.
×
×
  • 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.