Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. It's called sticky footer. Check out this link that could help you achieve that: http://ryanfait.com/sticky-footer/
  2. Weekends are pretty slow around here... ;-)

  3. Try what dsonesuk suggested and upon saving, make sure in the Save As: field you save the file with the .html extension. Plain Text Encoding field should have Unicode (UTC-8) selected for you. If no extension is provided, the file will default to .txt instead of .html. Works on my system.
  4. Are you saving the file with a .html extension? TextEdit should have the option of saving the file as a .html extension.
  5. Don E

    session timeout

    Just to note in regards to session.gc_maxlifetime that I discovered about sessions in-depth this past weekend, adjusting session.gc_maxlifetime does not necessarily mean that the session will last that amount of time. Here is a quote from the following link about session.gc_maxlifetime: http://http://stackoverflow.com/questions/1516266/how-long-will-my-session-last
  6. Don E

    Session question

    Is mysqli okay? I'm sure it is but I assume you mentioned that because the article is written using the mysql extension and it's no longer recommended to use the mysql extension but just to ask, is mysqli still okay even though its not as portable as PDO? Thanks.
  7. Don E

    Session question

    Fox and JSG, thanks for responses. PHP version is 5.3. JSG, this may abit outdated from 2004 but do you mean something like this by storing sessions in database: http://shiflett.org/articles/storing-sessions-in-a-database
  8. Don E

    Session question

    Hello everyone, I've done some search into the following but not sure what is the best route to take regarding sessions. If I have a cron job to do something at a certain time of the day, like delete files to free up space etc, what would be recommended to not have the cronjob delete the files where the file names of those files are stored in session for that user whose session is currently active? There is a session_status function which checks if any sessions are active but that is only for PHP 5.4 and up. Thanks.
  9. Don E

    undifened index

    Are you checking/getting any mysql errors anywhere? Just to note, it's recommended to use MySQLi instead of mysql. May not be the reason why but looks like you're missing a single quote for $post_title for the values in your mysql query. It's '$post_title Also make sure you're columns spelled correctly.
  10. Don E

    undifened index

    Looks like you spelled enctype="multipart/form-data" incorrectly, forgot the 'L'. You have: mutipart for multipart
  11. Is the page saved with .php extension? Is/was php and apache updated with no problems/errors? If all is fine with those, then do you have anything running on the server like a security program working with apache that might cause that? Checking logs/error logs could maybe help you see what's going on as well.
  12. Don E

    session cookie

    I'll try and illustrate: Per user that visits, when you have session_start(), a "session" is started/created for that user. So if any session variables are set like: $_SESSION['username'] or/and $_SESSION['loginStatus'], those variables contain values that are distinct for that user during his/her "session". So, you can say for example for "user's login session" like this: 'What is the users' login STATUS, which the status is stored in the variable $_SESSION['loginStatus'] for the current "session" for that user, that was started by session_start() ?' Hope this understands.
  13. echo prints out what htmlspecialchars (a function in PHP) returns from when you pass $_SERVER['PHP_SELF'] to it. $_SERVER['PHP_SELF'] contains the current file name. For the action attribute, you may be able to just write into the action the name of the page instead of doing the whole php echo.
  14. Try and change your pattern namecheck to the following: namecheck = /[A-Z,a-z]+s[A-Z,a-z]+/; That looks for letters, a space, and letters only. For i.e.: John Smith, like how names are. If anything that is entered that is not a match to that, it returns false. if(fnlname.value == ''){ fulname.innerHTML = '<b>full name is missing</b>'; return false;}else{ if(!namecheck.test(fnlname.value)) //if anything doesn't match the pattern above, test() returns false. So in other words, if it is TRUE that test() returns false, enter the if { fulname.innerHTML = '<b>Both Names Required</b>'; return false; }} If the user entered a pattern match for namecheck/test(), when the script reaches this point: if(namecheck.test(fnlname)){ fulname.innerHTML = '<b>checked</b>'; return false; } ... since test returns true, we should enter this if and set the innerHTML of fulname to <b>checked</b>. Hopefully this was of some help.
  15. For namecheck, try this instead: /[A-Z,a-z]s/; test() returns true or false. Have for the if: if(namecheck.test(fnlname.value)) instead of if(fnlname == namecheck.test(fnlname))
  16. In PHP, the dot is the concatenation operator. See this link: http://www.w3schools.com/php/php_operators.asp ...scroll down to String Operators. If you don't want to use the dot operator to concatenate, you can use double quotes with the variable included like the following: echo "My eye color is $color"; Because of being in double quotes, PHP displays(parses) the value of the variable $color. The output is: My eye color is green.
  17. Try removing var startTime out of the function makeBox and have it right before the makeBox function. Because it's in makeBox, the scope for that variable is local to the makeBox function only.
  18. Those aren't necessarily methods but properties actually. They are properties of that particular element. An HTML element is actually an object - an object has properties and methods(functions). .innerHTML, value, etc are properties for example of a particular element that you can reference to by using document.getElementById('myElement' ); getElementById() is actually a method for the 'document' object.
  19. From my time here, you may request name change via PM to a moderator.
  20. Most likely a moderator will be able to do that for you. I don't think we can do it anywhere in our control panel(regular user controls).
  21. In the else if condition, you can use && (and) to check if numapples is greater than 1 and less than 4. For example: else if(numapples > 1 && numapples < 4) If numapples is greater than 1 and less than 4, the else if is executed.
  22. Try adding <script src="myscript.js" type="text/javascript"></script> after <p id="demo"></p> and it should work. The script runs before the html page finishes loading. For your myscript.js file to access HTML elements once the page has loaded, add the following to myscript.js and leave the script in the head section of the html page and you should see "Hello World!' in the p elements' innerHTML displayed: // this assigns a function to the window.onload event and the function runs once the page has loaded.window.onload = function init() { window.alert("Hello World"); document.getElementById("demo").innerHTML = "Hello World!";}
  23. I'd use a text editor specifically designed for writing code like HTML, CSS, JavaScript etc instead of plain notepad. There are plenty of good free ones out there. Using a text editor is helpful in properly setting up and saving your files to the right extension for example in order to run properly. Other than that, I see you have spaces before and after your equal signs. Not entirely sure this matters. Try having them like this instead: id="leaders"
  24. You have one equal sign in the player if check, should be == I'm not sure if that is the issue but upon first glance, I noticed.
×
×
  • Create New...