Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. check what it is sending back - I think IE sends back the coordinates where the image was clicked rather than the value you assign.
  2. either float the image right or use absolute positioning and right: 0; to do the latter you will need a parnet container with position set to anything other than static (position: relative; will do the trick).
  3. you can use timezones in php too... You can either have people store there favoured time zone Or (more intensive) use something lie kgeoip to detect wher ethey are automatically. Factor the result into yout date/time function use.
  4. may sound silly but what is the significance of this format? I have just googled it and found nothing useful. if there is some mathematical conversion going on then knowing so would help other wise it appears you simply want to take your number - put a 'D' in front of it and then pad some 0's after it to make it a 7 char string. which would be <?php $id = 1; $id = 'D' . $id; str_pad($id, 7 , "0"); ?> that woudl convert '1' to D100000
  5. That html soup is difficult to digest... I suggest that you validate your markup http://validator.w3.org/ first - it needs to attention before we can really begin to help AND may solve you problem.
  6. No 2 (or more) elements on a page should have the same id. ID is used to uniquely IDentify an element in the DOM. Shoudl you require any js to work on the elements it will fail. If you wish to apply the same styleing to more than one element then you should use a class... The answer to the OP is to not float one of the divs, give the floated div a height: 100%. All is fine in modern browsers but you will need to use faix columns to get ie6 to play ball http://alistapart.com/articles/fauxcolumns/ PS. Sorry Kael but html is NOT for design so this idea that it needs a Photoshop canvas is far from the truth. There are beautifully designed sites out there all created with tableless layouts and some inventive css (and in some cases - no hacks).
  7. Its all about separation of style from content... The content of your page should flow naturally (so when no css is available it reads well). This aspect of having inline block elements is a design or styling issue so let the right tool do the right job; css. html, xhtml, xml etc. etc. have everything you will ever need to place content into a page - and don't try to do anymore than that. Once you have your content you can start designing it using css (and hopefully notihng else) then you get the visual layout you want. NOW css could do some more to help - that I will concede; but css3 has implemented some great features which once supported will make web design that much sweeter...
  8. From memory MySQL can handle any size of database - its the table size that is important - 4G is (from what I remember) the point where things go boobies up. Its the use of resources that are paramount. provided you apply the normalization well then all should be dandy. If you know your site WILL get bigger and bigger I'd go as far as to normalize the names of people!!!! Although I have rarely used oracle I would concede it is much more robust and has some very useful functions that you can't directly replicate in mysql. That said I believe MySQL is more than capable of providing the efficient resource 99.99999% of websites would ever need...
  9. if you combine that with a session you can keep them logged in. unless you have altered teh php.ini setting the session lifetime should be while teh browser is open. So as long as either a session exists or the timestamp is more than now - 5mins then you will be fine.
  10. YES - keep your data tidy.
  11. <script type="text/javascript"> var urvar = <?php echo $_SESSION['somevar']; ?>; // rest of js </script>
  12. You could add a snippet that runs and checks a value in the database against the date it was last edited. However this would entail an exra query on each request of the page you placed that query in - so as thorpe says a cron is really the only answer.
  13. you should probably be using the mysql full text search functions.... http://dev.mysql.com/doc/refman/4.1/en/fulltext-search.html formulating your query on teh correct fields will be VASTLY more efficient than using php to search each and every entry for a string an unspecified number of times.....
  14. just use php to iterate recursively through the directory and it can add each file to the list.
  15. just found these http://pobs.mywalhalla.net/ http://turck-mmcache.sourceforge.net/index_old.html - looks like they are free...
  16. have a look at http://www.ioncube.com/ or http://www.zend.com/products/zend_guard sure are more out there but it has been a while since I have looked about...
  17. it will take for ever to process... http://www.md5.rednoize.com/ - they have millions of records in teh database but still have millions more to add...
  18. <?php for($i=0;$i<$max;$i++) { func(): echo $var; } ?>
  19. you don't need the <?php tags to do this. have a look at eval - http://uk3.php.net/manual/en/function.eval.php
  20. give the centre span margin: 0 auto; and possibly give them all a width.
  21. well.... I find that search results are often best displayed as an unordered list (after all they are simply a list of results). The issue here is the text text text text bit. that in itself does indeed appear to be tabular data and as such a table is the correct markup. Do you have a link to a live page? seeing it and the type of infomation you are displaying would help deciding what is teh best route to take.
  22. 1. give each td a margin-bottom: 10px; 2. tr:hover td {border-color: #ff0f0f;}
  23. on line 4 of that script you either have an echo or print statement or you have broken out of php and begun ouputting html OR just plain old white space.
  24. yep - text-align: left/right/justify/center; that is for aligining the text content. to position the div itslef use float:left/right or podition:absolute/fiexed/relative.
  25. OR if you already have the date stored in the YYYY-MM-DD HH-mm-ss format which mysql handles so well... <?php $qry = "SELECT * FROM `users` WHERE `password` = '" . $_POST['password'] . "' AND `username` = '" . mysql_real_escape_string($_POST['username']) . "' AND `date` > DATE_SUB(NOW(), INTERVAL 30 Day)"; $qry = mysql_query($qry); If (@mysql_num_rows($qry) == 1) { echo 'GREAT - Your in!'; } else { $qry = "SELECT * FROM `users` WHERE `password` = '" . $_POST['password'] . "' AND `username` = '" . mysql_real_escape_string($_POST['username']) . "'"; $qry = mysql_query($qry); if (@mysql_num_rows($qry) == 1) { echo 'Your password has expired'; // put form in to chose new password... } else { echo 'User not recognized'; } } ?>
×
×
  • 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.