Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Christian, are you serious? You actually can't think of a way in PHP to track what links are clicked on your own website? *eyeroll* I do this on my sites, my Wordpress blog does it for me on my blog, etc etc. OP: Please come back and clarify.
  2. Have you used firebug to debug it yet?
  3. OP wants to know the last 5 links OTHER people clicked on, when they visited HIS site.
  4. <?php $menu = '<ul>'; $content = ''; $menus_sql=mysql_query("SELECT * FROM `tbl_menus`"); if(mysql_num_rows($menus_sql)>0){ $menu .= '<ul>'; while($menus_row=(mysql_fetch_assoc($menus_sql)){ $menu .= '<li><a href="#tabs-'.$menus_row['id'].'">'.$menus_row['menu_title'].'</a></li>'; $content .= ' <div id="tabs-'.$menus_row['id'].'">'.$menus_row['menu_content'].'</div>'; } $menu .= '</ul>'; } echo "<div id="tabs">$menu $content</div>"; ?> not tested.
  5. I would make these three separate functions, since each section of the switch block does a different thing. They're not really related.
  6. Where you previously wrote the word content? You'll put the content in there. Rather than echo'ing in your loop, assign the information to various variables you can echo later.
  7. To give the container height again, add a <br style="clear:both" /> after the floated divs.
  8. Yes, store the url in the database, then just echo the html for the link around the image.
  9. Anything is possible. You just have to figure out how to do it.
  10. Give the div a width.
  11. Of course you could do that with PHP.
  12. Looks like you'll have to retake the class. Maybe pay attention next time.
  13. That does not make sense
  14. 1. That parent and click to expand stuff doesn't even exist in your code yet. nvrnd. 2. You are writing the header row within your foreach, so it will appear with every row. 3. Rather than building an array in the while loop then looping through that using foreach, you can do that all at one time. 4. You already have $id... Add it to "org". What is the problem?
  15. $string = "http://www.youtube.com/watch?v=ruJ1uFf9hy4&feature=g-vrec"; $result = substr($string, strpos($string, "=")); $result = substr($result, 0, strpos($string, "&"));
  16. Congrats
  17. Really? you don't see anything wrong with "var-dump" ??
  18. Of course, but do be sure to provide the relevant information for the question, and that it's not something you can easily google like "how do I convert a string to uppercase" or something Cause then we'll give you a hard time. Read the links in Dan and my's signatures for advice on getting good help. Best of luck
  19. No problem BTW, if the problem was because you were trying to use a double-quoted string, use curly braces. $this->message .= " Unique: {$this->unique}";
  20. $this->message .= ' Unique: '.$this->unique;
  21. Don't use multiple databases for one application. Each application should have it's own database.
  22. With Wamp, did you start the server?
  23. You see where you close the connection? Stop that. Bad coder.
  24. Make $_SESSION['cart'] an array.
  25. If you don't understand $num%$divisor==0, look up modulus.
×
×
  • 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.