Jump to content

inactive

Members
  • Posts

    97
  • Joined

  • Last visited

Everything posted by inactive

  1. You need to look at a solution that will move the actual market, not re-load the whole map area. Load the updated lat/lon via json, then reset the marker position.
  2. It's called casting, i.e. as above, converting from one type to another. In most cases not necessary with PHP, as it implicitly converts when necessary.
  3. Is that two return statements in isLoggedIn? The second one will never be executed.
  4. You could do somedomain.com/clientname and use mod_rewrite (via .htaccess) or some other "friendly" url scheme to push all request to one file, which you use to look up the client's details in the db. Also consider looking into WordPress, which has multisite functionality, and auto sign-up options as well.
  5. You can also set $_GET['trace'] = 'blah'; But it's not a great idea.
  6. After splitting the CSV into an array, you can iterate through it and check for an email with filter_var($email, FILTER_VALIDATE_EMAIL)
  7. HEREDOC syntax is ended by the delimiter defined at the start, followed by a semicolon, followed by a newline. There was no newline, therefore it is not being recognised as the end of the HEREDOC. Adding an extra \n did the trick.
  8. Good point. Maybe I don't need to worry about this at all...
  9. Ah yes I beg your pardon, you are correct. *** I need it to return false, and die/exit. ***
  10. The PHP internal error handler will not be executed unless the error handling function returns true. I need this to happen. Returning true, false, not returning anything has no effect on the actual script itself. See the example here: http://au.php.net/manual/en/function.set-error-handler.php
  11. Hey homies, Is there anyway in the function I set in set_error_handler() to return true, and die? My code: <?php set_error_handler('my_error_handler'); function my_error_handler($errno, $errstr, $errfile, $errline) { // ... handle error here ... // } echo 1/0; // generates a warning trigger_error('Some Other Error', E_USER_ERROR); // generates user error ?> What the my_error_handler() function does will depend on the error type: 1) In the case of the warning, after handling the error, it will return true, so that the normal PHP error handler will log the error in the normal error log, and then it will let the rest of the script proceed. This works great. 2) In the case of the user error, I need it to handle the error, then return true, so that the normal PHP error handler will log the error in the normal error log, and then exit. I cannot get this to work. ??? Is there a way to return true, and exit/die? If I don't exit/die, the rest of the script will continue to run, with detrimental results. If I do exit, then it is not possible to return true, which means the error won't be logged properly by the normal PHP error handler. I.e: <?php exit(); // script will exit, return true; // but will not return true (obviously, as the script has already terminated) ?> <?php return true; // script will return true, exit(); // but as it has now jumped out of this function, will now not exit ?> Any ideas? Is this even possible? Thanks in advance.
  12. black box bug? i think a black hole might solve the bug that is IE.
  13. Yeah I've heard that there was another background bug in the beta which has been marked as fixed in the upcoming public release, so hopefully this one is too.
  14. Coolio cheers BoltZ, thats what i've done.
  15. Dropped them an email, but couldn't see anywhere to upload. Did I miss it?
  16. Cheers. Righto well had a quick squiz on PIE and can't find anything close....though probably someone out there on the wibble has found this one before. I'll keep looking, but any further tips would be great.
  17. Update: When the link is active (clicked on), then the hover will work. Weird as.
  18. Hey guys, I may have found a new bug in IE8, googled around a bit but can't find anything close...maybe someone here knows whats going on? Anyway, basically just a div with background colour, and inside sits a block displayed link, transparent in its normal state, but with a background image when hovered over. Test case at http://esquimaux.com.au/ie8bgtest/test.html So the HTML is like this (bare in mind the actual case is valid XHTML 1.1): <body> <div id="outer"> <a href="#" id="inner">test</a> </div> </body> And the CSS as follows: div#outer { width: 100px; height: 100px; background-color: #00FF00; } a#inner { display: block; width: 100px; height: 100px; background: transparent; } a#inner:hover { background: transparent url(testbg.png); } So its meant to just be a green square with the test link in it, and as you hover over it the backgroun image kicks in and the sits over the whole div, so the whole square goes blue (as thats the colour of the bg image). Works great in all good browsers, even IE6 and 7, but not IE8 (curiously though it does work in IE8 compatibility mode). In IE8 the bg image doesnt show. Any other hover css will work (changing link colour etc). Also, it will work if the initial link css doesnt have background: transparent set, but i need that tag for the site im working on. So it seems the IE8 can't overide the background: transparent on hover state. Any ideas?
  19. Ah Ha! RewriteRule ^(001¦002¦003)/foobar/$ foobar/index.php?code=$1&%{QUERY_STRING} [L]
  20. Hi guys, Hope I have the right forum here... I'm using the following rule in my .htacces (among others): RewriteRule ^(001¦002¦003)/foobar/$ foobar/index.php?code=$1 [L] This works great, enabling any requests to www.mysite.com/002/foobar/ to go through to www.mysite.com/foobar/index.php?code=002, which is what I want. However, if a user goes to www.mysite.com/002/foobar/?user=booyah, then I would like that parameter passed too (so www.mysite.com/foobar/index.php?code=002&user=booyah), but it doesn't. The paramters that may appear in the url may be there, or may not, and also will vary greatly. Can anyone help with how I change my rewrite rule? Cheers, Mitch.
  21. Anyone? I've used PHP's SOAP Ext as well as NuSOAP before, just note sure about the email bit. *bump*
  22. Make an array of error messages (which match the same order that $register is in): <?php $register_error_messages = array( 1 => 'You have not entered a correct username' 2 => 'Your password was not long enough' 3 => 'You smell bad' // etc etc for each of the register processes ); Then use what projectfear said, but with a loop for the errors: <?php $errors = array_keys($register, 1); // the 1 is there so we search the $register array for 1 only. if(count($errors) > 0){ echo 'There was an error! See below:<br />'; foreach ($register as $key => $value) { if ($value == 1) { echo $register_error_messages[$key].'<br />'; } } } else { echo 'No error!'; } Haven't tested it, but should be OK.
  23. http://isearchthenet.com/isearch/ Pretty yuck looking, but you should be able to customize it to look the way you want.
×
×
  • 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.