Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. You use empty parameters - function('val1','val2',,,'val5');
  2. Replace what original $data array? $data IS an array of the values pulled from your database.
  3. $data is already an array with values (1,3,4,5,x,y,z,...) Your $wtf is a string and putting a string into an array makes it the data in the first element of the array.
  4. Browser's don't have access to files due to the security hole that would open, which is why there are cookies. Can you add 1 to a cookie value and accomplish your task?
  5. Given that a 'lost password' script would involve updating an existing user's password field, not INSERTing a new record for him, are you sure your script is attempting to do what you want?
  6. or just use $row['thismonth']
  7. And you cannot use ini_set() for post_max_size and upload_max_filesize.
  8. You are referencing $_POST['firstname'], $_POST['lastname'], and $_POST['email'] when those variables don't exist, hence undefined index errors ($_POST is an array and is referenced using the index names of its elements.) You would need to determine why those variables don't exist.
  9. No one here knows why you are posting. The image you posted in the first post shows that your query does return a Name, Description, and CategoryNum - Name: TestCategoryName Description: TestCategoryDescription CategoryNum: 101 If those are not the correct values, you failed to simply state what the problem is and show what the expected results should have been and what the test data is.
  10. The BOM characters are placed at the start of the file by your editor when the file is saved. They are not characters in the source code in the file.
  11. Save the files without the BOM characters, using your programming editor.
  12. You cannot set it in a script, because the script is not executed until after the upload has been processed by the server. You can only set php settings in a .htaccess file when php is running as an Apache Module AND the web server has been configured to allow you to alter settings in the .htaccess file. You can only set php settings in a local php.ini when php is running as a CGI application AND the web server has been configured to get php to read a local php.ini. Since you are doing this on your localhost development system, you can set it in your master php.ini. Use a phpinfo(); statement to confirm that the setting was actually changed in case the php.ini that you are changing is not the one that php is using. You must also stop and start your web server to get any change made to the master php.ini to take effect. You must also set post_max_size to the larger value.
  13. WHERE do you want this file to be saved at?
  14. If you use mysql_error() in your die() statement, it will tell you why the particular mysql_ statement failed.
  15. And your code that is displaying the incorrect date/time is???
  16. I didn't ask what you had in it, I suggested what you can do to find out where the output is occurring at. You likely have some character(s) either before the <?php tag or after the ?> tag or the file has been saved with UFT-8 encoding and the Byte Order Mark characters are the output that is causing the problem.
  17. Unfortunately, the error message doesn't include the most important piece of information, where the output is occurring at. Since your session_start() is working without producing an error and I don't see any code that is sending output, it's likely that your mysqlconnect.php file is sending something out to the browser. If you put your require_once "scripts/mysqlconnect.php"; statement before the session_start(), you will likely get an error message from the session_start that tells you there is some output from the mysqlconnect.php file and as has already been stated, you must find and eliminate the output that is occurring.
  18. If you read the error message, it tells you where the output is occurring at that is preventing the session_regenerate_id() from working. You would need to find and eliminate that output.
  19. You MUST always validate external data once it reaches the server, so, you MUST use php validation. You CAN validate data using javascript before it is actually submitted, but this is only a convenience to your visitors that are actually using a browser to request your form and have javascript enabled. It does nothing for visitors that have javascript disabled or bot scripts that submit data directly to your form processing code and could care less if you have any javascript validation logic for your form.
  20. You are already in some php code, assigning a string to a variable ^^^. Therefore, you don't use php tags in it. If your goal is to get the $sjobnumber variable to be replaced by its contents, you either need to use double-quotes at the start and end of the string (which would require that you either escape any double-quotes inside of the string or change the quotes inside of the string to single-quotes) or you could use concatenation to make the $sjobnumber variable part of the string (which would allow you to leave the content you already have the way it is.)
  21. You are also using $db_selection in the mysql_query() statement. It should be $db_connection. The two settings I mentioned should be set in your master php.ini so that fatal parse errors will also be reported and displayed. Stop and start your web server to get any changes made to the master php.ini to take effect and confirm that the settings actually got changed using a phpinfo(); statement (in case the php.ini that you changed is not the one that php is using.)
  22. $HTTP_POST_FILES was depreciated a really long time ago (php 4.1, Dec. 2001), turned off by default in php5, and to be removed in the next major php revision. The code should be using $_FILES instead of $HTTP_POST_FILES
  23. Your code is using two different variables - $db_selection and $db_selected. Please develop and debug code on a system with error_reporting set to E_ALL and display_errors set to ON so that all the php detected errors will be reported and displayed. You will save a ton of time with these simple mistakes.
  24. It would help to know what that code is and the exact error message.
×
×
  • 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.