Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Don't put single-quotes around column names. That makes them strings, not column names.
  2. Please only start one thread for any problem - http://www.phpfreaks.com/forums/index.php/topic,302302.0.html
  3. Are you expecting to send emails to yourself at your email address at an ISP or are you expecting to send emails to any arbitrary email address? To send emails to yourself at your email address at an ISP, you can use one of the phpmailer classes that support SMTP Authentication. You authenticate against your email account (provide your email username and password) and you can send emails to your email address and you can also send emails through your email account to other email addresses. To send emails to any arbitrary email address, you must set up a PUBLIC mail server. A public mail server has a domain name associated with it, a public DNS server that points to it, and all the necessary DNS zone records that would allow other email servers to authenticate it is a valid public mail server so that they would accept emails sent by it.
  4. Do you know for a fact that the php mysql extension is loaded on your server? Are you doing this on a server with error_reporting set to E_ALL and display_errors set to ON so that all the php errors would be reported and displayed?
  5. In the code that sets $img = "..." . $table . "...";, $table does not have a value. Pretty simple, yes? If you want someone in a forum to help you determine why that would be so, you must post your actual code (not just a couple of lines taken out of context.) Telling us about what your code is supposed to do is pointless, because obviously it is not doing what you are stating.
  6. Your upload form does not have a field that sets $_POST['file'], so what was the if (!empty($_POST["file"])) { originally when the code worked on your development system? I'll guess it was $_FILES['file']?
  7. echo mysql_error(); on the next line after your mysql_query() statement to find out if the query is failing and why.
  8. SLOW DOWN (everyone). Your whole php code is being skipped over because $_POST['file'] does not exist. If your code worked on your development system (which I doubt at this point), but not now, something is preventing that post variable from being set. Start by posting all your code, including the form.
  9. Either your form is doing something that is php version/configuration specific and is invalid (unlikely) or the total size of the form data exceeds the post_max_size setting (fairly likely). What does a phpinfo(); statement show for post_max_size setting and what size of a file did you attempt to upload?
  10. Simply amazing, another "my code does not work but I'm not going to provide you with any real information about what my code is that would allow you to help me." Best guess is you are outputting content to the browser before your redirect and/or you don't really have error_reporting set to E_ALL and log_errors turned on so that ALL php errors would be logged.
  11. For debugging purposes (remove them when you are done), to see if there are any php detected errors, add the following two lines of code immediately after your first opening <?php tag - ini_set("display_errors", "1"); error_reporting(E_ALL);
  12. What exact symptom are you getting that makes you think the user is logged in? Also, what is your code that is testing $_SESSION['user'] to determine if someone is logged in?
  13. Your data probably contains white-space/non-printing characters (spaces, carriage-returns, nulls, line-feeds, ...) that is causing it be sorted out of order. Where did your data originate and how did it get inserted into your table? There are literally millions of php based web sites that use ORDER BY in queries that work. Had you stated or shown what results you are getting in your first post in this thread (where it belonged), you could have gotten an answer quicker, rather than playing around with what problem you actually are having.
  14. You are using php5 syntax on a php4 system. It is time to upgrade your php version. The end of life and end of support of php4 was over 2-1/2 years ago.
  15. And that gave you output in DESCending alphabetical order didn't it?
  16. Since you did not show the query you tried using ORDER BY and the output you did get, it is a little hard for anyone one here to tell you why it did not work.
  17. Did you read the error message, it is fairly self explanatory - The function display_forums() is being redeclared in the same place it was previously declared. The only way that can happen is if you are including functions_display.php more than once. Since you did not provide the name/author's site for the modification or if the /boards/includes/ path on your site is specific to the modification or something else you were already doing, it is not directly possible to provide more specific help.
  18. You are accessing the file using a URL and that is probably disabled. The error you didn't post (in your unedited post) and the abbreviated contents of the downloaded file are probably errors alerting you to this fact. If the file is actually local to the server, you should be using a file system path to access the file in the readfile() statement. By using a URL, you are causing your server to make a http request back to itself, to read the file, then output it. That consumes three times the bandwidth than just reading the file through the file system and outputting it. Edit: If you open the abbreviated downloaded file using your programming editor, what does it contain?
  19. Assuming you don't have duplicates (i.e. sys2, asteroids, sys2, asteroids), this should (untested) work - SELECT name, count(*) as cnt FROM system_contents WHERE contains IN('asteroids','planets') GROUP BY name HAVING cnt = 2
  20. There's nothing wrong with your query or code and it works as expected (just tested) provided you have data in the Editor_Candidates table so that the user_id matches up rows between the Responses and Editor_Candidates table.
  21. The value from a mysql_query() will only be FALSE if the query fails due to an error (i.e. no connection to the database server, no database selected, a syntax error in the sql, a duplicate key...) A query that executes without any errors but matches zero rows is a successful query and returns a result resource, but the result set contains zero rows in it. You can use mysql_num_rows() to find out how many rows are in the result set.
  22. Did you try that to see if it worked or not? One of the points of programming is you can try ideas and immediately observe the results to learn if your idea was correct or not. You don't need to wait around in a programming forum to learn answers to basic questions like that.
  23. $row["login_timestamp"] is either empty or not defined. Have you checked by echoing it (or use var_dump()) to see what exactly it is?
  24. In mysql, if you execute an UPDATE query and none of the values are actually different, the actual UPDATE is not performed and the table is not changed. There is no guarantee that any other database exhibits that same behavior. You would need to check the values yourself in your code to determine if the submitted values are the same as the existing values.
  25. You are missing quotes around the file name, making php think it is a defined constant (if error reporting was set to E_ALL you would see some notice messages alerting you to this problem.) Edit: Specifically -
×
×
  • 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.