Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. take a look at LDAP, changing directory permissions is not a definitive solution
  2. protected function _doNote($note) {} public function doNotes() { foreach ($notes $as $note) $this->_doNote($note); } public function doNote() { $this->_doNote($someNote); } for more on this do a read up on refactoring, btw your NotesActions is a wrong MVC implementation, you are currently doing VC without the M (Microsoft's MVC implementation as found in VB, where controller and model seems to be the same thing), your controller should only delegate calling required models to do all calculations, fetch data, etc.. and decide which view to use for rendering, the view then renders the data from the model for which it may use view helpers if to complex to render
  3. http://be.php.net/manual/en/mbstring.installation.php
  4. http://framework.zend.com under downloads you can find subversion
  5. $group = ''; while ($row = mysql_fetch_assoc($result)) { if ($group !== $row['user_group']) { $group = $row['user_group']; echo '<h3>' . $group . '</h3>'; } // roll out rows..
  6. you can upload a video just the same as you upload a file, as long as it does not exceed upload_max_filesize, you need a streaming server to display the contents to your users, an easy method is using the google youtube api, which allows your users to watch a video on your website and upload their video to youtube
  7. use a singleton, but only when you want to work with it in multiple scopes pear uses a destructor which calls all child destructors, the only problem here is that your classes have to implement the parent class the parent destructor is then registered with the shutdown function i think, so one destructor starts the destruction of all registered objects
  8. post your code, on what i can see is that you do not have the right to query under username www-data
  9. i think we all do post your code but i would suggest something like: select * from table where field1 in (value1, value2, ..) and field2 in (value3, value4, ..)
  10. it is not allowed to double post (http://www.phpfreaks.com/forums/index.php/topic,211788.msg964746.html#msg964746) bump instead
  11. SELECT id, poster, subject, post, post_date, pagename FROM blog WHERE pagename='" . basename(__FILE__) . "'" or SELECT id, poster, subject, post, post_date, pagename FROM blog WHERE pagename='" . basename($_SERVER['SCRIPT_NAME']) . "'"
  12. function recursiveTree($parent) { $result = mysql_query('SELECT * FROM image_category '. 'WHERE parent_id="'.$parent.'";'); $result_count = mysql_num_rows($result); // display each child echo '<ul>'; while ($row = mysql_fetch_array($result)) { if ($parent !== $row['image_category_id']) { // or something else that changes and means that we are going a level deeper recursiveTree($row['image_category_id']); } else { echo '<li><span class="folder">' . $row['title'] . '</span></li>'; } } echo '</ul>'; } post your table fields
  13. use the Zend_Mail component from the zend framework http://framework.zend.com
  14. use an access control list to control access to your pages
  15. curl: http://be.php.net/manual/en/book.curl.php
  16. ignace

    Forums

    bbcode: http://be.php.net/manual/en/book.bbcode.php
  17. $query = "select * from users"; $result = mysql_query($query, $db_connection); $content = file_get_contents("inc/index.inc.php", false, null); while ($row = mysql_fetch_assoc($result)) { $content = str_replace($result['name'], '<a href="#">'.$result['name'].'</a>', $content); }
  18. @barand that however will also write the html (head, title, meta, ..) to his database
  19. SELECT player_id, date_joined, firstname, lastname FROM players GROUP BY date ORDER BY date DESC $currentDate = ''; while ($row = mysql_fetch_assoc($result)) { if ($currentDate !== $result['date']) { $currentDate = $result['date']; list($date, $time) = explode(' ', $result['date']); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); echo date('<your-format>', mktime($hour, $minute, $second, $month, $day, $year)); } .. }
  20. nope just use checkboxes, the user selects the criteria and then starts typing in the search field, the suggestions are then based on the criteria the user chose
×
×
  • 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.