Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. Can't help there sorry. You would need a trigger from the SMS receiver to your webserver.
  2. You would never do it like that. You should implode an array. $string = implode("<br />", $cities); print $string;
  3. You can use online SMS providers. They will give you an API to send messages. Search Google.
  4. In Save the current file as: dropdown choose Unicode (UTF-*) (or an encoding that you want) Clear the checkbox “Include a byte-order mark (BOM) when saving as Unicode - Click Save as… and overwrite the original file.
  5. http://uk3.php.net/manual/en/function.putenv.php
  6. Explain how you have done this. For MySQL make sure you have chosen the correct encoding for your tables. Also use this query after connecting to the database prior to any insert query: mysql_query("SET NAMES UTF8");
  7. file_get_contents() is slow compared to a curl request.
  8. If in the scope of a function you must return an array to the global scope $cities = array(); while($row = $this->DB->fetch()) { $cities[] = $row['city']; } return $cities;
  9. Your code is fine. What is the issue? If 0 results are found check that your query is correct.
  10. Do you mean data type? If so lon / lat values are stored in a float.
  11. I have this. It works but does anyone see an issue on large amounts of data? SQRT(POW(69.1 * (latitude - $startlat), 2) + POW(69.1 * ($startlng - longitude) * COS(latitude / 57.3) , 2)) AS distance
  12. I have a design issue. Lets say I have a table of landmarks each with a longitude and latitude value. I want to be able to extract other landmarks within a given distance i.e. 6 miles. Has anyone a soluition to this with regards querying.
  13. yes, like you put before UPDATE table SET whatever = NULL WHERE whatever = '0000-00-00'
  14. In this quick example, yes But you wouldn't want tainted data being placed back into the form values i.e. HTML tags, script injection, etc
  15. To be honest I would have just used $_POST (after cleaning the values) and not $_SESSION for this task as the data is not persistent anywhere else except the page with the form. i.e. <select name="test"> <option value="1"<?php if($_POST['test'] == 1) print " selected"; ?>>1</option> <option value="2"<?php if($_POST['test'] == 2) print " selected"; ?>>2</option> </select> If using sessions you will have to make sure you destroy all of the values otherwise if a user comes back to the form all of the values will still be pre-filled.
  16. No, you can either open and close php tags only where you require them or you can use the << EOH syntax as below <?php $html = <<< EOH <p class="header">This is some text</p> <p>$contentInAVariable</p> EOH; print $html; ?> Alternatively you could use a template engine to completely separate the logic from the view. http://www.smarty.net
  17. Exactly the same only in a select list you use the argument 'selected' within the option element i.e. <select name="test"> <option value="1"<?php if($_SESSION['test'] == 1) print " selected"; ?>>1</option> <option value="2"<?php if($_SESSION['test'] == 2) print " selected"; ?>>2</option> </select>
  18. If you look at what they have in terms of facilities and the relaxed environment it seems a fantastic place to work. However I remember the BBC did a piece on working for Google and the employees were saying that it's not all it is cracked up to be i.e. developers get pushed to breaking point, if you don't work all the hours under the sun the chances of promotion are none existent. Quite shocking really.
  19. print_r is for debugging but the easiest way is print "<pre>"; print_r($array); print "</pre>";
  20. Site doesn't render in Firefox 3 either. What browser are you using? If you shrink the size of your browser window look what happens.
  21. I'd offer more money. It's impossible!
  22. Given that it is a one way algorithm there is absolutely no way of obtaining the plain text value of the hash. 5 Playstations exploded upto now.
  23. Hang on i'm still plugging in my 2000 playstations
  24. Also why the hell would you put this in the footer of your site: Opimitized For Gecko & WebKit Browser Rendering Engines Trident Rendering Engine (Internet Explorer) may not properly work Thats like saying if you use IE then tough shit. You should make it work.
×
×
  • 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.