Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. The value="..." attribute only applies to your original type='text' field. It is not used for a <textarea></textarea> For a textarea, you output the content between the two tags.
  2. read is a reserved mysql keyword. If you truly have a column by that name, you should rename it to something else or you can enclose it in back-ticks everywhere you reference it in a query.
  3. You need an exit; statement after your header() redirect to prevent the remainder of the "protected" code on the page from being executed when the page is requested. Without an exit; all a hacker needs to do is ignore the header() redirect and he can still use anything on the protected page the same as if he was logged in.
  4. No. It won't. At least try something first.
  5. Browser's don't read php code because php is a server side scripting language. Perhaps if you explained exactly what you are trying to accomplish with a real example of the code you want to use.
  6. It always pays to browse the documentation first for answers to basic "can php/how to do this in php" questions - http://www.php.net/manual/en/function.range.php
  7. You have got to be freaking kidding. How would you expect it to get downloaded with the proper extension in every possible browser and in every possible situation.
  8. @dad00 - If you literally output < and > using any method, the browser will treat them as the start and end of a html tag. You must convert them to html entities to so that they are not operated on by the bowser.
  9. Use htmlentities() with the 2nd parameter set to ENT_QUOTES The < and > of the php tags look like html tag delimiters and cause the php code to be treated as a html tag.
  10. The value='...' attribute needs to be enclosed in quotes and you should use htmlentities() with the 2nd parameter set to ENT_QUOTES
  11. http://www.php.net/manual/en/function.ignore-user-abort.php And you would need to actually test it on your server to make sure it works as expected.
  12. A slight correction to the above, apparently the filename= attribute MUST use double-quotes. Using single-quotes actually created a target file with single-quotes as part of the name. I tested using an actual .doc file and $type = 'application/msword';. With both IE8 and FF3.5 and both left-clicking and right-clicking/save link as... resulted in the file being saved with the correct filename and extension. I can recall that older IE browsers wanted to use the name of the .php file that was in the link when you did not correctly specify the attachment; filename=\"$name\"" Something specific to what or how you are doing this is causing the symptom. I would examine the actual filename and type in the database to see what it actually is.
  13. It works for me in both IE8 and FF3.5 using some made up data. Does $name include the extension or not and what exactly is the type and extension as the problem could be specific to the content-type and extension. The only thing technically wrong with the posted code is that the filename='...' attribute needs to be enclosed in quotes.
  14. Running your code and dumping the $salts array gives the correct values - Array ( [0] => re [1] => st [2] => ma [3] => sy [4] => ex [5] => tr [6] => ha [7] => un [8] => co [9] => ru )
  15. No. It doesn't. The leading 'r' is under the 2nd character in the line above it because 10 in wwuser10 has one more character than all the other lines above it.
  16. That's because <optgroup> tags don't have name and value attributes. Only <option> tags have values. Ref: http://w3schools.com/tags/tag_optgroup.asp Whatever you are trying to do, you must do using the value="..." attribute of each <option> tag.
  17. When you do a "view source" of the page in your browser, what do you see? If you see the raw php code - <? echo $rows['datetime']; ?>, then please, please, please only use full opening php tags <?php as the short open tag <? is not always enabled and you won't always be on a server where you will have the ability to enable them.
  18. That's because it is a reserved word and should not be used as a column name - http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
  19. Query to accomplish the above statement - $query = "SELECT your_column, ABS(10-your_column) as dif FROM your_table HAVING dif <= 5";
  20. Take the absolute value of the difference between the desired value (10 in your example) and the value in the table. Then return those rows with a result that is less-than or equal to 5.
  21. Each page that sets or references a $_SESSION variable needs a session_start() statement. Based on the space before the <?php tag in the code posted for action.php, you likely have a header error that prevented the session from starting. Are you developing php code and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your php.ini so that php would help you? Stop and start your web server to get any change made to php.ini to take effect and use a phpinfo() statement to confirm that the settings were actually changed in case the php.ini that you are changing is not the one that php is using.
  22. http://www.php.net/manual/en/function.func-get-args.php
  23. In programming, it is not enough just to look and see that something is present, you must check that it is correct. How about doing this part - Until you find out why the two values are not matching on your server with your database, you will never solve this.
  24. Do some troubleshooting, you were already told how -
×
×
  • 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.