Jump to content

muzzs

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by muzzs

  1. Use the Google Maps API. I recently posted a blog post on exactly this at http://www.murraypicton.com/2010/12/free-uk-postcode-lookup-using-the-google-maps-api/ Hope it helps!
  2. muzzs

    help with regex

    Hi Syed, AbraCadaver has a pretty good solution but it can be improved upon, their solution will match "x < 1", "X <= 1" and "x <=! 1" etc... I would do: $array = preg_split('/([<>=!]{1,2})/', $string, null, PREG_SPLIT_DELIM_CAPTURE); Hope that helps! Muzzs
  3. Hi nkosinathi, Thanks for posting your XML and question. If you go to http://www.xmlvalidation.com/ and paste in your XML, you will see that you have an invalid XML character &#x0. I would pass this onto whoever is proving the XML and ask them to fix it. Hope that helps!
  4. When a file is submitted to a php page using the standard php file input it is uploaded into a temporary folder. From there it is then possible to check the name etc. of the uploaded file and move it to a more permanent place on your web server. Since PHP version 5, temporary files are only held in the temporary directory for the length of the execution of the script - they are removed when the script completes executing. In PHP < 5, the files are kept until the operating system decides to do a cleanup.
  5. Hi ntroycondo, This is a MySQL question really and so is in the wrong forum. What you need to use to get the desired result is the MySQL wildcard character (%), when this is used with the LIKE keyword, it is a wildcard for 0 or any number of characters. E.g. if you wanted it to allow partial strings that all start with the correct letters you will want: $result = mysql_query( "SELECT * FROM guest WHERE name like '$pname%'" ); Hope that helps!
  6. Hi Jumparound, I would think that the problem with your download being blank is being caused by this line: header("Content-Length: .filesize($size)"); You haven't closed your string before the filesize function (Also, are you not getting the size out of the database directly so don't need the filesize function?) and so it won't be a correct header. It needs to be changed to: header("Content-Length: ".$size); Hope that helps!
  7. Hi JDest, The way I would do this is buffer the output into a variable which will then allow you to strip the last , before you print it out as the final step. E.g. <?php $buffer = ""; while($current_month<10) { $buffer .= "[". $current_month .",". number_format($remaining_balance, "2", ".", ",") . "],"; } print(substr($buffer, 0, -1)); //Remove the last character and print ?> Hope that helps!
  8. Hi, I am not sure what your problem is, but to fix the SQL so that PHP parses it correctly you have to use the backslash (\) in front of any " you use in the string so that PHP doesn't see it as the end of the string. A fixed version looks like the following: $sql="INSERT INTO sheet1sa (ext, F2, cell, name, dep, F6, empno) VALUES ('$ext', '$sec', '$cell', '$name', '$dep', '<img src='./pics/$empno.jpg' width=\"80\" height='90' />', '$empno')"; Hope that helps!
×
×
  • 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.