Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. It's $dom->loadHtml($data); Use File() when you are actually loading a file. To suppress the invalid errors use libxml_use_internal_errors(true);
  2. WHERE Date BETWEEN '2010-05-24' AND '2010-05-27'
  3. Yes, most Flash websites have these 2 options at their landing page:
  4. <script type="text/javascript"> function previewImage(source, destination) { destination.src = source.value; } </script> <img id="preview" src="no-image.jpg" width="100" height="100"> <input type="file" onchange="previewImage(this, document.getElementById('preview'))"> Tested it in FF3 and IE8 Edit: It doesn't work I now realize why it worked for me.
  5. So I assume you use SQL Server? Have they got mssql available?
  6. Yeah but these websites apply the Graceful Degradation technique which means that if you do have JS disabled you will still be able to work with the website instead of being completely locked-out like your website does. Some examples that keep working even after JS is disabled: Google Maps, ReCaptcha, GMail, this very forum, ..
  7. I figured that much as it's a broadcast address. @Mchl don't you mean ini_set('display_errors', 'Off'); for production instead of error_reporting(0) as setting the latter will mean not a single error is logged only display_errors dictates whether or not it should be published to screen. See if you can login in to phpmyadmin using these details.
  8. Have you tried my code? As I am certain that this is what you were trying to do. And your code is just too complex for something so simple.
  9. cassandra_ColumnOrSuperColumn cassandra_Column Is that the composite pattern? If so then class cassandra_ColumnOrSuperColumn { public function findColumnByFieldValue($value) {} } class cassandra_Column extends cassandra_ColumnOrSuperColumn { public function findColumnByFieldValue($value) { return NULL; } } class cassandra_SuperColumn extends cassandra_ColumnOrSuperColumn { public function findColumnByFieldValue($value) { foreach ($columns as $column) { if (in_array($value, $column->toArray())) { return $column; } } return NULL; } } In your main program: $access = $columnOrSuperColumn->findColumnByFieldValue('access'); if (NULL !== $access) {//found
  10. Use border-bottom instead of text-decoration and add some padding to it 1px or so.
  11. I noticed it they came out clearer. But like Daniel already said underlined text is the best as it's a convention and everyone will understand what is going on.
  12. http://www.wpdfd.com/editorial/thebox/deadcentre4.html
  13. Your table structure and field naming make it very unclear what contains what. The basic formula for calculating percentages is: (small / big) * 100 (eg (1024 / 1100) * 100 ~ 93%) just remember 80/100 so you know where which value should come.
  14. No it did work that's what you are failing to see and your mysql credentials are wrong (cf "Access denied for user: 'john@255.255.255.255' (Using password: YES)") And if you don't want to expose your information set display_errors to Off on your production server. Try this: try { if(!$link = mysql_connect($host, $user, $pass)) { throw new Exception("Can't connect to server: ".mysql_error()); } if(!$database = mysql_select_db ($data, $link)) { throw new Exception("Can't select database: ".mysql_error()); } } catch (Exception $e) { error_log("Caught exception: ". $e->getMessage()); include('404.html'); exit(0); }
  15. Surround it with ` and it will work. Otherwise the dash (-) is seen as an operator.
  16. $album=$_GET['album']; should be $album=basename($_GET['album']); or you'll soon find that some users where scanning some other directory then those albums.
  17. Look up Graceful Degradation, when I disable JS I can't view any tutorial.
  18. You are missing a }
  19. Loop through them, you could add them all to the To field however then your customers will know how many and who you have also as a customer. [ot]wemustdesign do you know your website has been reported as a potential attack website?[/ot]
  20. function urlify($value) { return 'http' === substr($value, 0, 4) ? '<a href="' . $value . '">' . $value . '</a>' : $value; } Use like: echo '<td>', urlify($cell), '</td>'; Is this something like PHPMyAdmin you are creating if so you may be better off using a plugin system like: function table_cell_helper($value) { $value = call_plugins('counties_table_cell', $value); } function call_plugins($identifier, $value) { $plugins = get_plugins($identifier); foreach ($plugins as $plugin) { $value = call_user_func($plugin, $value); } return $value; } Use like: echo '<td>', table_cell_helper($cell), '</td>';
  21. If I understand what you are trying to do, then this should do it: list($number, $carrier) = explode('@', $User_Serv_Numb); echo 'Carrier: ', $carrier, "<br>\n", 'Number: ', $number;
  22. My suggestion would be to just add (at the minimum) an underline to it maybe even a background-color?
  23. http://www.phpfreaks.com/forums/index.php/topic,298482.msg1413420.html#msg1413420
  24. Number of pages: $numberOfPages = ceil($record_count / $per_page); Calculate start: $pageNumber = $_GET['page']; $startIndex = ($pageNumber - 1) * $per_page; for ($i = $startIndex; $i < $record_count && $i < ($startIndex + $per_page); ++$i) { //.. } @jcbones does that code contain fragments from my Paginator class I posted here a few times?
  25. Use Ajax to communicate with the PHP side to store the information.
×
×
  • 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.