Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. How exactly are you doing that? What is your php code that is processing the file?
  2. Check what your actual error_reporting/display_errors settings are using a phpinfo(); statement in a .php file. You are likely changing a different php.ini than what php is using. You also would need an equal sign in the error_reporting = E_ALL line.
  3. Either a cron job (unix/linux) or a scheduled task (Win)
  4. Any time you have a SET of same type data, you need to use an array. Once your data is in the form of an array, you can use a simple for or foreach loop to iterate over the data in the set. You should also extend the array concept to your getAttachedFile and getAttachedFileDesc methods so that you don't have duplicate code where the only difference is which piece of data it operates on. (i.e. your methods should probably accept a numeric parameter that causes them to return the the correct 1st through 5th values.)
  5. You need to use htmlentities (with the second parameter set to ENT_QUOTES) on all content/data that you output on a web page to prevent any special HTML characters (such as <, >, ', "...) in it from breaking the HTML syntax on your page. And, if you are putting any special characters in to a URL, you need to use urlencode
  6. The errors are generated at the header/session_start statement, but they are caused by the output that is being sent that then prevents the header/session_start from working. Until you find and eliminate the output that is being sent, you are doomed. If you cannot determine what is causing the output and you expect someone else to help, you need to post the error message and the corresponding code.
  7. Best guess is you are either using a Word Processor or a non-English keyboard to write code with and the code you are running is not exactly what you have posted.
  8. It is unlikely that the the error is exactly the same. Even if the line numbers changed, that is significant and would tell someone where and what the problem is and that would lead to a solution. Post the exact error message you are getting with the code posted above.
  9. If the posted code is checkLogin.php, then you have about 5 new-lines and what looks like a space before the first opening <?php tag. Remove all the crap before the <?php tag.
  10. Not necessarily. For example, the lack of a specific From: address might be causing the mail server at your host to simply discard the email and not even attempt to send it. Which of the two messages 'Message successfully sent!'/'Message delivery failed...' is being output by the posted code? FYI: A TRUE status from the mail() function just means that there was a sending mail server and it accepted the email to be sent. It does not mean that it was actually sent. What does adding the following two lines of code immediately after the first opening <?php tag show - ini_set("display_errors", "1"); error_reporting(E_ALL);
  11. Change all your short open tags <? and <?= to <?php and <?php echo
  12. Blank pages are usually due to fatal parse errors. You would need to set the error_reporting/display_errors settings in your master php.ini (and confirm that the settings are actually changed using a phpinfo() statement) in order to have php report and display fatal parse errors. If your code is actually executing but is not producing any output, you would need to post your actual code if you want someone else to help determine what is causing the symptom. We cannot help with something without seeing it and there is not one 'fix' for any specific symptom because 10,000 different people could have written this thread and there could be something different wrong with each of their programs that are producing the same symptom. You also need to set error_reporting to E_ALL because hiding notice messages would more than likely hide the reason why your code is not doing what you expect.
  13. Are you expecting general users to need to upload that size of a file or just you/administrator/site-owner? You would generally use FTP to move such a large file or break it into manageable pieces then reassemble it on the server after all the pieces have been uploaded.
  14. The From: address in any email must be a valid mail box at the sending mail server. You should put any entered email address as the Reply-to: address. You are putting the entered email address as the From: address. Most of the major ISPs will discard any email that contains a From: address that says the email came from that ISP's mail server but the actual sending mail server is not that ISP's mail server.
  15. The code you implied in the first post should work if $row['expiredate'] actually contains a DATE value. What symptom did you get that makes you think it did not work? If you are trying to retrieve only rows WHERE expiredate is greater-than or equal to todays date, you would do that directly in your query using a WHERE clause - .... WHERE expiredate >= CURDATE()
  16. ALL external data (post/files/get/cookie) cannot be trusted and must be validated on the server. There is no guarantee that YOUR form or any form at all was used to submit data to your form processing code.
  17. Based on the string of topics being started, several so hastily made they were not even in the correct forum section, it is probably an exam of some kind.
  18. The first step is to insure that the HTML markup and any CSS being used is valid - http://validator.w3.org/ http://jigsaw.w3.org/css-validator/ You would then need to locate the php/html/css that is responsible for the output in question and correct it so that it produces the same result in all browsers.
  19. The code that defines the variable in question is inside of a conditional statement that evaluates as FALSE, so the variable does not exist. Later, the code unconditionally references the variable in question, producing the undefined variable error. The code that is unconditionally referencing the variable either needs to be put inside a conditional statement if the variable is optional and it might not exist (edit: or you need to define the variable in question with a suitable default value at the start of the code) or if the variable should always exist, you would need to find out why the $_FILES['field_12']['name'] was an empty string and is causing the variable to not exist.
  20. Your code in connection.php is either failing to make a connection or it is not setting $con to the link resource returned by the mysql_connect() function call.
  21. When you use negative logic in the comparison, the and/or condition needs to be complemented. Which is why using negative logic should generally be avoided as humans don't do well reading or writing negative logic. if($id =='0' || $id =='1'){ // the value was 0 or the value was 1 } else { // the value was not 0 and it was not 1 } if($id !='0' && $id !='1'){ // the value was not 0 and it was not 1 } else { // the value was 0 or the value was 1 }
  22. The single-quotes around the column names in the query make them strings, not column names -
  23. Your index.php file either has a bunch of crap before the <?php tag or your functions.php file is outputting something. If you put the opening <?php tag in index.php on a line by itself (move the require_once() statement down so it is on the line after the <?php tag) you can tell if the output is something in index.php or functions.php
  24. There is no need to simulate when you can download and install the actual software on just about any PC - http://dev.mysql.com/downloads/
×
×
  • 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.