Jump to content

hansford

Members
  • Posts

    562
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by hansford

  1. $ad_display_every = 6; $count = 1; while($data = mysql_fetch_array($result)){ echo ' <td>'.$data['phone'].'&nbsp</td>'; if($count == $ad_display_every){ //add google code here $count = 1; } else{ $count++; } }
  2. post your function and we'll see where its going wrong. Include the whole page where the function is called and the actual function.
  3. I'd have to see it in action to see what the problem was
  4. looks like you have to do this. SDMenu.prototype.init = function() { var mainInstance = this; for (var i = 0; i < this.submenus.length; i++){ if(i == 0 || i == 6) { continue; } this.submenus.getElementsByTagName("span")[0].onclick = function() { mainInstance.toggleMenu(this.parentNode); };
  5. Get the articles out of your DB-that is a huge resource drainer and one of the worst errors as far as web developemt goes. Put in the path to the acrticle and the filename in the DB, but the actual file should be stored on the server. Make this change now and you will not regret it.
  6. are you storing the whole article in the DB or just the path and the filename? It should be just the path and filename, then you can get the path & filename info from DB to retrieve from the server. $path = $row['path'] . row['filename']; $file = fopen($path, "r", TRUE); $lines = //enter the number of lines you want from the file $count = 0; if($file){ while($count < $lines){ $buffer = fgets($file, 4096); echo $buffer; count++; } fclose($file); }
  7. function beans() { alert('hello'); do_function(); } function do_function() { alert('hello there') } beans(); ----------------------------OR function do_function() { alert('hello'); } var beans = do_function; beans();
  8. just have php echo out all of the javascript.
  9. function beans() { alert('hello'); } var beans = do_function();
  10. google: javascript, scroller
  11. download the script. It has instructions for installing. http://sourceforge.net/projects/phpmailer
  12. you are correct. $parsedNumber never gets incremented so the while loop goes on forever. $parsedNumber++ has to be incremented in the while loop in order to ever exit the while loop.
  13. using the mail function in php is not the way to go IMO. the recipients mail server can view it as spam and just filter it out. PHPMailer works great. You just use your smtp settings from your hosted account.
  14. looks like you need to align it better. check properties top, margin-left etc
  15. when you pass an array to a function it's still an array. You have to create a loop in the function if you want to get it's values in a logical manner.
  16. interger, char, string, float, long, bool etc...
  17. The way it works here is: first you ask a question and post along with any relevant code.
  18. sorry, I don't have the time and me doing it won't make you a better programmer. If you aren't interested in the pogramming, then re-post your question, using what I told you needs to be done, and maybe one of the others will have the time to help.
  19. image_link value in your DB holds that information. Every one of the files in your database is set to your main images forlder. You're going to have to write some code to go through your database and make thumbnails for all of your images which currently have none. You need to then run through the DB and change all of values of image_link to point to your thumbnails directory.
  20. put the call to the second function in the first function When sessionstate=4 then call that function
  21. You can incorporate it using either get or post. Her's another basic example <body> <form name='form1' method='post' action="<?php $_SERVER[php_SELF] ?>"> <input type='hidden' name='clicked' value=""/> </form> <?php if(isset($_POST['clicked'])){ //make connection to DB and add 1 to the number of times clicked echo "link clicked"; } else{ echo '<a href="#" onclick="print_page(); return false;">Print Document</a>'; } ?> <script language='javascript'> function print_page(){ window.print(); form1.clicked.value = '1'; form1.submit(); } </script> </body>
  22. lol been there, done that-will be there again and again. I feel your frustration.
  23. in the gallery display page just point to the thumbs directory instead of where the orginals are stored.
  24. just get rid of target="_blank" in the form; then when your function is called add it if you want another window open like: form1.target="_blank";
  25. The problem with that is: say $pageNumber = 1 and $parsedNumber = 1 neither of them change when they are in the while loop, so the condition is always true, so the loop never ends. while((($pageNumber*20)-19)<= $parsedNumber && ($pageNumber*20)>= $parsedNumber)
×
×
  • 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.