Jump to content

Hokus

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by Hokus

  1. yeah, it should. It gets cluddered to look at pretty quick ... but if you have MASSIVE amount of html you need to block with if/else, then it's certainly possible. You can even sprinkle the html inside of the if/else with php. e.g.: <?php for($i=0; $i<10; $i++) { ?> <div>This is some html stuff <? echo $i ?></div> <?php } // end for ?>
  2. That is one of the cool features of php, that you can jump in and out php and html. Somehing like this would work: <?php for($i=0; $i<10; $i++) { ?> <div>This is some html stuff</div> <?php } // end for ?>
  3. http://developer.mozilla.org/en/docs/AJAX:Getting_Started
  4. Hello, Not exactly sure if this post belongs in the CSS or JS department, but here goes: I have a div where I add child divs to dynamically with javascript. the parent div has a scrollbar. When I add a new child div to the parent, is there a way to force the scroll to the bottom of the parent div? either with JS or CSS Thanks! # Problem solved ! --> http://radio.javaranch.com/pascarello/2005/12/14/1134573598403.html #
  5. thank you, just what i was looking for.
  6. Hello, I need to add some text to a html FILE input tag when a page loads. Since the "value" attribute does not work on FILE inputs, is there perhaps a workaround with JS? e.g. this does [b]not[/b] work: <input type="FILE" value="some text" /> Thanks!
  7. Hello, I'm trying to create multiple iFrames with javascript to do some serverside stuff in the background. when I want to dynamically create a 2nd or 3rd iframe within a div, i have to "reload" the contents of the div, which means ALL the iframes will refresh ... so, is there a way to dynamically insert an iframe outside of a tag? this is what i'm using: function numForms() { str = document.getElementById('numForm').innerHTML document.getElementById('numForm').innerHTML = str + '<iframe class=\"hideFrame\" src=\"iframe.php\">'; } I need the previously generated iframes NOT to refresh when I dynamically add another. Hope it makes sense .. just started playing around with JS. Thanks!
  8. You could set up a counter, start a new row and reset it every third count. i.e. [code]$count = 1; echo '<tr>'; while( $row = mysql_fetch_array($query) ) {    echo '<td>'.$row[field].'</td>';       if($count == 3)    {       echo '</tr><tr>';       count = 0;    }    $count++; } echo '</tr>';[/code]
  9. http://www.phpfreaks.com/forums/index.php?...topic=57424&hl=
  10. For PHP/MySQL... I learned alot from the examples provided in O`Reilly's books; PHP Cookbook and MySQL Cookbook. I personally think they are the best on the market (that I know of anyway). Also Prentice Hall has a series called CORE. These are books that details PHP and MySQL.. and a lot of other juicy stuff. However, these books are very theoretical, but it seems you want to learn technical terms etc. so they might be good for you. Personally I preffer books that provide examples of usage (Like the Cookbooks). 3rd, the owner of phpfreaks recently launched a book for the "basics" of PHP. I have it on my shelf and Injoyed that a lot too. If books doesn't "do it" for you, I suppose you'd be forced to peak in the online manuals once in a while. Honestly, I don't think anyone coding PHP gets around that.
  11. Hi, this thread discusses the same isue: http://www.phpfreaks.com/forums/topic12635.php After you hit 99999, no further entries can be made until you change the int max value in MySQL.
  12. Simply don\'t assign any value to the field you want to auto-increment, MySQL will do it for you.
  13. Why not eliminate their ability to enter other chars then AZ and 0-9. This can be done pretty easily with regex.
  14. I believe you can stuff anything into your database, even $)(@@$COFFEE and (*(&\'ICECREAM. Atleast in MySQL.
  15. Just make one script which performs both.
  16. Here are a few tutorials to get you startet: http://www.freewebmasterhelp.com/tutorials/phpmysql/1 OR http://hotwired.lycos.com/webmonkey/progra.../tutorial4.html You might want to have a look at the most exellent tutorials on phpfreaks as well. However the first link i posted teaches you PHP/mySQL from the bottom -> up. enjoy.
  17. Hokus

    Query

    Thanks, works like a charm.
  18. Hokus

    Query

    How can i sellect one value from multible cols ? "SELECT * FROM recipes WHERE category1 OR category2 OR category3 = \'Appetizers\' "; what query would i use ? Thanks.
  19. Hokus

    Database design

    That\'s a good idea, never thought of that before. However, what if I have say 60 different catagories. then i have to make 60 cols + all name, text, ID etc. SQL then have to look through all the recipes to find which ones are marked \"1\" in that specific category. Won\'t that make the DB search extreamly slow ? amount of recipes will eventually be 10,000+
  20. Hello, I\'m building a food-recipe database. Now, i want to arrange my recipes in different categories i.e. Appetizers, Main Courses, Soups etc. That\'s not much of a problem. However, here is what i would like some sugguestions on: Say I arrange categories in different tables. <Appetizers> <Soups> etc. what if i want to add a new recipe to the database, and it is a recipe which belongs under both catetories (a soup that is also and appetizer). I don\'t want to write the recipe twice, ones to both tables. Then, when i want to retrieve information, how can i destinct a recipe which is both a soup AND an appetizer. ? would you recommend me to write all recipes into one table, and then destinct them by category ID\'s ? (e.i. \"a\" for appetizer, \"as\" for appetizer AND soup.) or is there a easier way to acheve this functionality ? Thanks.
×
×
  • 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.