Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. very similar... did you get any errors? (you might find the javscript console for ff useful - its reporting is far better than IE's.) I'm just intrigued as to why it didn't work.
  2. OOOPS sorry just bothered to look at the code. They have the option of just using mail() or connecting.... I'm not that hot on mail servers but I am guessing that they do all the things behind the scene that the smtp connect does in php mailer. To test them I suggest you echo out the micro time at start and finish of each module - send 100 emails or so to get a good average. That should give you an idea - you could also check the amount of memory each is utilising which when combined with the time taken should give you a very good idea of which one is more efficient...
  3. record their ip address and whois them. contact their isp and get their home address. run round and either kill them or tie them up while you update it to ie7 and put ff on there as well. then kill them....
  4. php is processed and finished when the users sees the full page so no html cannot call a php file. I suspect your are trying to make a php template in which case include and require are your friends - you'll find them explained in the manual.
  5. you could use javascript BUT users will soon learn that the submit button has to be hit so I would not bother putting in extra work that is unneccessary and may play up when you are in a textarea.... just live with it - it doesn't hurt.
  6. that is what the + is for - it means one or more times...
  7. this doesn't work in ie6 or less you can use css.... div#topright { position: fixed; top: 0; right: 0; } or if you don't mind javascript doing it.... immediately after the closing div tag put this code ... </div> <script type="text/javascript"> keepVisible('topright'); </script> (assuming the div you want in the top right has an id of topright!!!! - chnage that accordingly.) then in the head section of the page <script type="text/javascript"> keepVisible = function (id) { var el = document.getElementById(id); var getScrollTop = function() { return document.body.scrollTop||document.documentElement.scrollTop }; el.keepInView = function() { var target = getScrollTop(); var curY = el.offsetTop; var curY = el.offsetTop; var newY = null; target = 0; newY = curY + ((target - curY)/20); newY = Math.ceil(newY); if ( newY == null ) { newY = target; } el.style.top = newY + 'px'; } setInterval('document.getElementById("' + id + '").keepInView()',10); } </script> that will kind of slide it in if you want it to just move immediately then set newy = curY.
  8. do you wantthis to happen the instant they chenge numbers? you have a submit buttone which would pass the info to a page for processing but I suspect you want this to do it insitu... <html> <head> <script type="text/javascript"> function calc() { var a = document.getElementById('txt1').value; var b = document.getElementById('txt2').value; document.getElementById('answer').value = a + b; } </script> </head> <body> <form name="frm1"> x<input type="text" name="txt1" id="txt1" value="5" onkeyup="calc();"><br> y<input type="text" name="txt2" id="txt2" value="10" onkeyup="calc();"><br> <input type="text" name="answer" id="answer" value="" /> sum<input type="text" name="sum"> </form> </body> </html> you can swap onkeyup for onchange or what ever trigger you prefer using....
  9. well the error refers to an unclosed '}' so somewhere (amongst that html soup you have there) you need to close some flow control block of code correctly.... Can't see where - eyes hurt when faced with that much html....
  10. http://www.oracle.com/technology/pub/columns/hull_php2.html As for the future - at present it would seem that asp jobs are approximatly 3-8% better paid. Why? Not too sure BUT you can bet your bottom dollar once business's realize that they are both capable of performing the same thing but PHP is cheaper and slightly faster this shoudl change - the down side is that Microsfot will wish to remain competetitve so may make their server more secure and improve the performace of .asp(x et al) to match PHP. Its reall about what the market calls for - many firms are happy (God knows why) to use more expensive systems thinking more cost means more secure/better perfoming - the reality is that simply is not true. Others please add their own 2 penneth.
  11. It checks that the characters of $_GET['m'] are numeric which could be done like so <?php preg_match("/\d+/", $_GET["m"]); ?>
  12. "SELECT COUNT(course_login_id) AS num, login_date FROM course_login WHERE staff_id = $iStaffId ORDER by login_date DESC"; first row of results will give youthe info you need.
  13. maybe if you alter the angle you are looking at the screen you will see it - a wonderful optical effect of lcd screens.
  14. all these things use teh mail() function - they simply provide you with a whole load of bits that make your job formatting and addressing multiple recipients, bcc, ccc etc etc. Which one you choose to use is up to you. If some of the available classes don't quite meet your requirements then you either adapt or roll your own.
  15. if you use preg_match and include the matches parameter then an array will be retruned from the function with all the matches of your regex.
  16. You are using singleton tags in transitional html... Your dtd does not allow for the '/>' closing for that tag.
  17. look like a list to me! tabls suck ass.
  18. the link I gave is teh pgn fix for ie < 7
  19. in you place the div before the input in your html and flost the div right that should do the trick - this will of course depedn on teh width of the input element and the minimum width of any child element in the div.
  20. There is no method - on screen media you can use position:absolute to 'layer' the table on top of an image. Print media doesn't do anything with elements outside the document flow so if both image and table were poisitioned absolutely niether would be printed. To have them printed you would have to swicth to posiyion: static and they would then not sit on top of one another.... So in short - NO you can't do it.
  21. $guess = "3"; change to $guess =$_POST['gues']; You may also widsh to put the switch further down - inside the body tag otherwise you may not notice it upthere in teh top corner.
  22. doc type declaration - if you look at the source ocde of many web pages the very first line will read something like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> (that is from this page - I personally only use xhtml1.1 these days) that is you doctype. Now if you put this at the top of all your pages .. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> you will get ie in standards compliant mode - initially you may think it hsa destroyed all your hard wrok in styling but the truth is if you stick with it and get your layout right you should find far more browsers will render your site in a very similar manner.
  23. frames and iframes are a relic of yesteryear. just switch to nice clean mark-up, div layout etc. (use iframe if you are including a web page that is not on your server if you really must - i prefer to just open a new window) and think about breaking code up so you can use inlcude files - that will help you A LOT.
  24. if you use a secure socket layer and validate the username and password - make sure they don't have any sql injection etc then that is as secure as you can get. Sessions are for maintaining state of the login between requests. A client side cookie transmits all the data in the cookie with each request - which others may intercept. Sessions store an id to a client side cookie and the rest of the info is maintained on the server. Values can only be created or altered on the server so the only thing someone can do is replicate on their own machine and appear as another on teh site. Provided that you request a password for anything like updating a profile OR keep the original email address of the user for ever then you should be fine.
  25. new windows are something that are requested client side. Since php is over and done before the client renders any html it will take no further part until another request is made to the server. A new window is considered a document effect on the client side so you either use javascript or target="_blank" if you still do oldskool non-standards compliant html.
×
×
  • 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.