Jump to content

theverychap

Staff Alumni
  • Posts

    78
  • Joined

  • Last visited

Everything posted by theverychap

  1. I would suggest wrapping an element around your component and using CSS !important declarations to override the existing ui styles... Does that help?
  2. // set error to false var error = false; // get all the textareas... var textAreas = document.getElementsByTagName('textarea'); // loop through the textareas, checking the value is not empty... for ( i=0; i <= textAreas.length; i++ ) { // if any one of them is empty, error will be set to true... if ( textAreas[i].value == '' ) { error = true; } } // is there an error? (is error true) if ( error ) { alert('there are errors...'); }
  3. The reason it was breaking is because you cannot have any other elements inside a UL tag, the only allowed children of a UL are LI tags. As Haku as posted, your DIVs should be _inside_ your LIs.
  4. Or do something like: <legend> Creating Yi <span style="float:right;"><a href="#next">Next</a></span> <span style="float:left;"><a href="#prev">Prev</a></span> </legend> Which is a lot neater
  5. Indeed, has Haku says, use clears to clear your floats. If you have a box floated left, to get the next element under it you would need to clear:left it...
  6. Please add more detail to your question - it is difficult to understand what you are trying to achieve.
  7. That _is_ a correctly formatted mySQL date...
  8. foreach ($_POST as $k=>$v) { if ( !isset($k) && empty($k) ) { // display error } }
  9. You shouldn't really need the server root? $_SERVER['DOCUMENT_ROOT'] will always return the full path to your web root. Why do you need to use the server root as you call it? - i'll be more than happy to help
  10. or wrap nl2br around the wordwrap function: nl2br(wordwrap($html, 10, "\n", true));
  11. Your $result array has been iterated through to the end (looped through all elements, and so cannot loop through again). Try a reset just before your while loop: reset($result) while (...
  12. I would suggest using javascript (jQuery is an excellent library) to call your php script every n seconds and append the returned data to the page... Something like: setInterval("$('#container').load('phpscript.php')", 5000);
  13. ems are based on the width of the letter "m" for the font you are using. bear this is mind, using different fonts will change the size too...
  14. totally possible, just use: [code]<td class="1 2">...[/code] and styles from both classes will be applied... it does get more complicated depending on specificity and styles declared but thats enough for you to be getting on with ;~)
  15. [code]$filename = layouts/$theme/news_template.php;[/code] should be [code]$filename = 'layouts/' .$theme .'/news_template.php';[/code]
  16. [code]<?php // form is submitted if ( isset($_POST['submit']) ) {     $agree = $_POST['agree'];     if ( $agree == 'yes' )     {         header('location: page.php');     }     else if ( $agree == 'no' )     {         echo 'you have selected no<br/>';     }     else     {         echo 'form not submitted yet<br/>';         show_form();     } } function show_form(); {     ?>     <form name="question" action="" method="post">        <select name="agree">               <option value="yes">Yes</option>               <option value="no">No</option>        </select>        <input type="submit" name="submit" value="continue" />     </form>     <?php } ?>[/code]
  17. theverychap

    Scroll box

    [!--quoteo(post=356237:date=Mar 18 2006, 08:28 PM:name=ReVeR)--][div class=\'quotetop\']QUOTE(ReVeR @ Mar 18 2006, 08:28 PM) [snapback]356237[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hello. I need to output some text into something that will allow scrolling. I was thinking framesets/iframes, but that will need a seperate file, which i don;t wanna do, is there somethign else where i can dumb a bunch of text that will scroll? Thx [/quote] <div style="width:200px;height:400px;border:1px solid red;overflow:auto;"> the text... </div>
  18. I have recenty fallen in love with Kate No, it's not a bird, it's a rather marvellous text editor for KDE. very good in fact, it's now my editor of choice. has all the usual things like sytax highlighting, collapsible brackets/tags, you can also save projects so each time you open a project all your files pop up in tabs too, rather helpful. anyhoo, as the last few posts had mentioned quanta,i felt compelled to post. The irregular crashing of Quanta has put me off it, same with bluefish too. kate is great, never crashed once and i'm sure if it did, she would load herslef back up with all my files that were conveniently saved before exiting... sorry, i'm dribbling now, it's all tis talk of the lovely Kate. Vim is also good, but (as mentioned by just about everyone in the world) Vim is hard to get used to. so is emacs for that matter. I reckon (and this would p*ss a few people of to say the least) KDE should take apart Vim, give all those awkward commands some easier access and call it, wait for it, Kim! lol sorry i couldn't resist. see, i could play with Kate while slowly breaking in Kim, now that sounds good. lol, maybe i could even synchronise them using KitchenSync. ok pmsl.
  19. On Linux Quanta is what i use, but while in windows world i use Developers Pad. DevPad is way, way, way out of date now! (many years) i really should upgrade, ive been using it for years. its essentially a vb editor (dont ask me i never touch the stuff!) but it has syntax highlighting for 99% of the languages we are likely to use. Er, im not even trying to justify it, it is actually quite poor (!?), plus its windows only and all that, in fact i'd probably have a go at someone for suggesting it!! oops lol. but at the same time i love it. strange. Looking at Zend Studio - I'm ready to buy this when i get time to stop and think. and for a paid editor i'd want full on super duper everything, and the support (if need be) to go with it. There are plenty of free / freeware editors out there. I suppose everyone gets used to working in theirs.
  20. Excellent, thanks man EDIT: (20 minutes later) looks like a great OOP resource - maybe i'll finally understand OOP properly!
  21. Quoting czambran from post: http://www.phpfreaks.com/forums/index.php?showtopic=51603 " I recently decided that It was time for me to learn the OO capabilities of php and I bought this book:"PHP5 Power Programming" which waas co-authored by the co-creator of the php and zend engine. I highly recommend the book. " I think this is the next book i'm buying too Steelman: good idea to pin this topic, i'm hoping it will help us all.
  22. I love these threads that last forever... lol :!!!: Ive just passed my web design exam to im going to buy myself some professional website design software, i think its called frontpage, have any of you heard of it? apparently its the best software out there for making websites, all of the other programs add extra lines of code and what people call 'bloat', but not frontpage, oh no, its a lean clean web designing machine. ahahahahahah, sorry.
  23. @rebullmarky - that was at no. 3 in my list m8 - excellent book i think @bane: no probs m8 - the two books you say you are going to buy are great choices, the sams php and mysql web development book is on its 3rd edition now, make sure you get the latest ed. as some of the code in my v1 book is verydated now... cheers for now. tvc.
  24. Hi, I recived a pm today from a fellow phpfreaker regarding php books, i replied with the following, it may be of help to php peeps that are looking for a good book but are unsure of what to buy... Hi mate, no problem, heres my current list of books: 1. Sams teach yourself php in 24 hours (excellent book with some fundamental things we need to know, taught me a lot and i still occasionally look at it now). 2. peachpit press, 'php and mysql' quickstart guide (not as good as the others, they use old syntax etc) 3. sams php and mysql web development (this IS what i classed as my bible, its on its third edition now, id strongly recommend this book, absolutely great, taught me an awful lot of what i know today) 4. developers library advanced php programming (this book is quite hardcore, not too many php examples etc but has a wealth of information avout design patterns etc, 'a practical guide to developing large scale php applications' - damn good read!) 5. sybex (php freaks' eric rosebrocks book) 'creating interactive websites with php and web services' (i brought this solely because it was erics first book, to be honest its not the best book i have, but has some great chapters, plus a lot of it is familiar beacuse i have been a phpfreak for a few years now..)no disrespect to Eric what-so-ever! 6. oreilly php pocket reference - nice little 'pocket sized' (!) book outlining all f the php functions etc - nothiing that cant be found on the net but for £7 its a must have, i keep it in my laptop bag (along with apache pocket ref and mysql pocket ref - good books) I also ohave loads of other books, namely html, xhtml, javascript, dhtml, css & css2, css programers guide, linux in a nutshell, flash 5 and mx (i dont use flash anymore though) I would recommend sams or oreilly, you can guarantee a quality book from them. 99% of the books i have are by these guys and 95% of them are excellent books. stay away from the 'visual quickstart guides' (peachpit press) - it seems they write books a few years behind everyone else! hope thats enough info for you mate, take care, Stuart / theverychap.
  25. Yes, thats true, even if your directory has no index file and the browser shows your list of php files, the best anyone could do is know the exact path to your files, hack in and steal them. If anyone were to click on any of the files, or try to download them, only the output of the script gets shown, not the actual php source...
×
×
  • 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.