Re: [PHP] Re: pattern containing single quote in IF statement

2006-12-26 Thread Frank Arensmeier
First of all, I strongly feel that you should have double quotes around the string you like to compare with (e.g. "new"). Otherwise, you are comparing against a string but to something else (integer ?). Without quotes, PHP will throw an error (not sure if it will throw a fatal error or some

Re: [PHP] Downloading utf-8 encoded files

2006-12-26 Thread Bernhard Zwischenbrugger
Hi Try this: There shouldn't be a character encoding problem with this two lines. Don't forget the mime type: http://earth.google.com/support/bin/answer.py?answer=25094&topic=1139 bernhard Am Dienstag, den 26.12.2006, 17:22 +0500 schrieb Fahad Pervaiz: > I want to download UTF-8 encoded kml f

[PHP] Re: pattern containing single quote in IF statement

2006-12-26 Thread Jahangir
I tried that also but it didnt work. if($_GET['query']=="some'u'all") { filter($query);} I still get the same error. ""Jahangir"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am stuck at a wierd problem. I am trying to do comparision between a > "query string" and a "string valu

RE: [PHP] pattern containing single quote in IF statement

2006-12-26 Thread Peter Lauri
Quote: here is the code: if($_GET['query']==new) { filter($query);} elseif($_GET['query']==some'u'all) { filter($query);} elseif($_GET['query']==all'u'ppl) { filter($query);} Did you forget about "" around the strings? /Peter www.dwsasia.com - company web site www.lauri.s

RE: [PHP] calling a function in the same page

2006-12-26 Thread Peter Lauri
This is what you could do. Separating them into a few files. Also read the http://en.wikipedia.org/wiki/Ajax_%28programming%29 to learn some more about AJAX. You should also learn more about Server Side Scripting so you understand what can be done with Server Side Scripting and Client Side Scripti

[PHP] pattern containing single quote in IF statement

2006-12-26 Thread Jahangir
I am stuck at a wierd problem. I am trying to do comparision between a "query string" and a "string value". the string consists of some diacriticals and single quotes. But when i try to escape the single quotes using backshash (\) it doesnt work. and when i try to use it inside a double quote preg_

[PHP] Downloading utf-8 encoded files

2006-12-26 Thread Fahad Pervaiz
I want to download UTF-8 encoded kml files from a website. I have written a script that automatically downloads KML file. Problem is that some of the utf-8 charc are distrubed after saving file on windows. below is the script. . . . $handle = fopen($link, "rb"); $handle2= fopen("kml/$i.kml

RE: [PHP] calling a function in the same page

2006-12-26 Thread Aras
You can not call PHP functions through a href which is used for linking web pages. You need to create a new file or use a switch in your current file for search input, with the function in it. So that you can link to that URL, not the function itself. You can use AJAX as well, to send commands t

Re: [PHP] calling a function in the same page

2006-12-26 Thread Ryan Fielding
Jahangir wrote: I am trying to call a function from "a href" inside the same page. this is the code: echo "More results from Mysite"; // calling the function isearch function isearch($query) {$query=urlencode($query); $request='http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=Ja