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. OP wants to know the last 5 links OTHER people clicked on, when they visited HIS site.
  3. <?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.
  4. I would make these three separate functions, since each section of the switch block does a different thing. They're not really related.
  5. 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.
  6. To give the container height again, add a <br style="clear:both" /> after the floated divs.
  7. Yes, store the url in the database, then just echo the html for the link around the image.
  8. Anything is possible. You just have to figure out how to do it.
  9. Looks like you'll have to retake the class. Maybe pay attention next time.
  10. 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?
  11. $string = "http://www.youtube.com/watch?v=ruJ1uFf9hy4&feature=g-vrec"; $result = substr($string, strpos($string, "=")); $result = substr($result, 0, strpos($string, "&"));
  12. Really? you don't see anything wrong with "var-dump" ??
  13. 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
  14. 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}";
  15. $this->message .= ' Unique: '.$this->unique;
  16. Don't use multiple databases for one application. Each application should have it's own database.
  17. 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.