Re: [PHP] My Project

2005-07-19 Thread Marek Kilimajer
Paul Waring wrote: On Tue, Jul 19, 2005 at 09:50:06AM -0700, George B wrote: My money is being stored in a database. And I want everythign to be in PHP, no java script. And the BUY!! Button is a input button from a form. :) Well in that case you probably want something like this (after

Re: [PHP] Session has new id on 'some' pages.

2005-07-18 Thread Marek Kilimajer
Andy Pieters wrote: Ok found the solution, seems like one page is on http://server.org.uk and the other on www.server.org.uk even though its the same server it generates a different session id! set the domain of the cookie to 'server.org.uk', it's the fifth parameter of setcookie() --

Re: [PHP] PDO Error

2005-07-15 Thread Marek Kilimajer
Holografix wrote: Hi. When using this example from http://netevil.org/talks/index.php?t=pdos=20, the site of pdo's author I have this error: Fatal error: Call to a member function fetchAll() on a non-object in /www/home/testes/pdo_my1.php on line 17 $dbh = new

Re: [PHP] PDO Error

2005-07-15 Thread Marek Kilimajer
Holografix wrote: Hi Marek It's print_r($row), not print_r($stmt) ;) That's what I'm asking - If you put print_r($stmt) in that line, what does it print? Marek Kilimajer [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Holografix wrote: Hi. When using this example

Re: [PHP] PDO Error

2005-07-15 Thread Marek Kilimajer
Holografix wrote: print_r($stmt) prints nothing. print($stmt) print nothing too. I checked errorCode() and it prints . Then it seems $stmt is false. var_dump() is more verbose about it. Marek Kilimajer [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Holografix wrote

Re: [PHP] Removing special characters

2005-07-14 Thread Marek Kilimajer
Computer Programmer wrote: Is there a PHP built-in function to retrieve only the alphanumeric characters from a given string? I know that I can check for alphanumeric characters using the function ctype_alphanum () but it won't retrieve the alphanum characters. I also know that I can use

Re: [PHP] OT - Fonts

2005-07-13 Thread Marek Kilimajer
Richard Lynch wrote: On Tue, July 12, 2005 1:30 pm, timothy johnson said: I am trying to use a font on my webpage that I have on my system only after a friend sent it to me. But its a neat little font that I want to use in a couple place on my site, like some of the headers. So I have two

Re: [PHP] IBM's Learning PHP Part 1 tutorial.

2005-07-06 Thread Marek Kilimajer
Richard Davey wrote: Hello André, Wednesday, July 6, 2005, 3:25:37 PM, you wrote: AM Depending on the sittuation, IMHO, COUNT(*) wouldn't be the way to AM go. If you need the user's id or somesuch, you have to run an AM additional query to get the info. But they're returning absolutely

Re: [PHP] clear the page and continue

2005-07-04 Thread Marek Kilimajer
Fred wrote: Outstanding James! A different approach to get a more flexible result. Fred. or document.getElementById(blah).style.display = 'none'; innerHTML is not supported by many browsers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: constant() - php5

2005-06-29 Thread Marek Kilimajer
Jason Barnett wrote: Actually, thanks for pointing out this function to me because I never even knew that it existed. You learn something new every day. I have to admit that a warning seems a little unusual given that an undefined variable would result in only an E_NOTICE. Especially since

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Marek Kilimajer
Jasper Bryant-Greene wrote: Jochem Maas wrote: header('HTTP/1.1 301 Moved Permanently'); also consider that using 'Status' may be better or possibly both to cover you bases, e.g.: ?php header(HTTP/1.1 301 Moved Permanently); header(Status: 301 Moved Permanently); ? Waste of

Re: [PHP] SAFEMODE w/ PEAR

2005-06-25 Thread Marek Kilimajer
Ashley M. Kirchner wrote: I'm having a small problem with SAFE MODE and PEAR that I'm unsure how to solve: [error] PHP Warning: raiseerror(): SAFE MODE Restriction in effect. The script whose uid is 524 is not allowed to access /usr/lib/php/PEAR.php owned by uid 0 in

Re: [PHP] Strange is_dir() behavior

2005-06-25 Thread Marek Kilimajer
Marcos Mendonça wrote: Hello I'm using PHP 4.3.9, under Windows XP with Apache. I have the following directory structure on a given app, i'm working on. photos/ folder1 folder2 folder3 ... and so on I'm trying the following code to make a list of folder under

Re: [PHP] Checking requested range

2005-06-21 Thread Marek Kilimajer
Neil Doody wrote: Is there anything in PHP which would allow me to check the requested range of bytes by an client? Basically one of the download scripts I made some time ago got hit by a load of requests for a file, but the server was giving back 416 Requested Range Not Satisfiable. I

Re: [PHP] Predictable-random array

2005-06-20 Thread Marek Kilimajer
Dotan Cohen wrote: I've got an array $items which has about 200 entires. I want to print them out in random order, but as usual, I have a catch! I need to add a 'key' so that if need be, I can always return to the same 'random' order, like so: $items=predicatable_random($items, qwerty); so for

Re: [PHP] pcntl_fork and reading from childs stdout

2005-06-12 Thread Marek Kilimajer
Tom Fishwick wrote: Hi All, I have a script that spawns off a bunch of children with pcntl_fork(), but I can't figure out how to connect up a pipe from the parent to each childs stdout and stdin. In c I would use pipe,close and dup... any ideas would be appreciated. (that don't involve using

Re: [PHP] Making a page loop with header('Location: ...

2005-06-09 Thread Marek Kilimajer
Joe Harman wrote: is it possible to make a page loop with header('Location : page.php')??? I've ran into a little bit of a snag with php execution time... so, i need to execute the page a few times so that I can split the operation up into multiple parts... my other option would be to make a

Re: [PHP] Making a page loop with header('Location: ...

2005-06-09 Thread Marek Kilimajer
Joe Harman wrote: On 6/9/05, Richard Davey [EMAIL PROTECTED] wrote: Hello Joe, Friday, June 10, 2005, 12:36:13 AM, you wrote: JH is it possible to make a page loop with header('Location : JH page.php')??? JH I've ran into a little bit of a snag with php execution time... JH so, i need to

Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!

2005-06-08 Thread Marek Kilimajer
Jason Barnett wrote: Marek Kilimajer wrote: Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print

Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!

2005-06-07 Thread Marek Kilimajer
Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the

Re: [PHP] What is faster?

2005-06-06 Thread Marek Kilimajer
Mark Cain wrote: I see your point about including the timing code in the calculation itself and while it does add time to the process, he is not just timing this code -- he is timing this code against another. Meaning we don't want to know How fast is this code? per se -- we want to know Which

Re: [PHP] linux php editor

2005-06-06 Thread Marek Kilimajer
Clive Zagno wrote: the truth is Ive been developing on windows, because of some .net developments. Ive been starting most new projects as web applications and using php/mysql. On windows I used ultredit, then I found a product called phpedit, which I liked, now Im trying to move to linux.

Re: [PHP] mozilla urlencode

2005-06-05 Thread Marek Kilimajer
John Taylor-Johnston wrote: This works: District of St. Francis http://www.glquebec.org/tezt.php#District+of+St.+Francis a name=District+of+St.+Francis/a This does not: Montréal District #2 http://www.glquebec.org/tezt.php#Montr%E9al+District+%232 a name=Montr%E9al+District+%232/a I'm

Re: [PHP] Deerpark (aka Firefox 1.1 alpha) URI's and PHP

2005-06-05 Thread Marek Kilimajer
Richard Lynch wrote: On Sat, June 4, 2005 3:53 am, Chris Drozdowski said: Will PHP scripts that work properly with the current version (1.0.4) of Firefox need to be modified for the feature detailed below in Firefox 1.1? See: http://www.mozilla.org/projects/deerpark/new-web-dev-features.html

Re: [PHP] stripping html tags

2005-06-05 Thread Marek Kilimajer
Dotan Cohen wrote: I took this example from php.net, but can't figure out where I went wrong. Why does this: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i , , $text); throw this error: syntax error at line 265, column 39: $text = preg_replace(/head(.|\s)*?(.|\s)*?\/head/i

Re: [PHP] Parsing wml files as php

2005-06-05 Thread Marek Kilimajer
Dotan Cohen wrote: I have gone over and over through google and various archives, but cannot come up with a solution even though I am convinced that this is a FAQ: I want to parse my .wml files. So in .htaccess I have: AddType application/x-httpd-php .wml AddType text/vnd.wap.wml .wml But it

Re: [PHP] Parsing wml files as php

2005-06-05 Thread Marek Kilimajer
Dotan Cohen wrote: On 6/5/05, Marek Kilimajer [EMAIL PROTECTED] wrote: Dotan Cohen wrote: I have gone over and over through google and various archives, but cannot come up with a solution even though I am convinced that this is a FAQ: I want to parse my .wml files. So in .htaccess I have

Re: [PHP] mozilla urlencode

2005-06-04 Thread Marek Kilimajer
John Taylor-Johnston wrote: I seem to have a problem with Mozilla or with IE? echo a name=\.urlencode($mydata-district).\/a; a name=Montr%E9al+District+%234/a http://foo.org/_private/directory.php#Montr%E9al+District+%234 works in IE6, but Mozilla will not accept it. Mozilla does not work.

Re: [PHP] ampersands in href's

2005-06-04 Thread Marek Kilimajer
Jack Jackson wrote: Murray @ PlanetThoughtful wrote: If I want to make a link to a URL which includes some GETs can I just do: a href='{$_SERVER['PHP_SELF']}?p={$p}c={$s}' ... etc etc or must I escape the ampersand somehow? Depends very much on the document type of your page. Valid

Re: [PHP] Frames or iframes? (Basically The devil or deap sea or A rock and a hard place etc) - - - - (0T)

2005-06-04 Thread Marek Kilimajer
Ryan A wrote: I had a real good flash header which she too liked, so I modified the header and she really liked it, problem is, its around 230kb to load, so I thought I'll put it in a frame (top frame - header, bottom frame- content and forum) so the flash part won't reload on each page

Re: [PHP] Frames or iframes? (Basically The devil or deap sea or A rock and a hard place etc) - - - - (0T)

2005-06-04 Thread Marek Kilimajer
Ryan A wrote: On 6/4/2005 5:30:14 PM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: Ryan A wrote: I had a real good flash header which she too liked, so I modified the header and she really liked it, problem is, its around 230kb to load, so I thought I'll put it in a frame (top frame

Re: [PHP] Frames or iframes? (Basically The devil or deap sea or A rock and a hard place etc) - - - - (0T)

2005-06-04 Thread Marek Kilimajer
Ryan A wrote: Hey, Thanks for replying. Since its a forum and she is not doing any advertising its important the search engines index the site properly or shes going to have a big forum with no visitors. Then I read that the search engines dont like frames muchso I was thinking of

Re: [PHP] How to find random records in a subset?

2005-06-03 Thread Marek Kilimajer
Brian Dunning wrote: I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, why can't you use the where condition in the above query? and then use MySQL's in command to find them. I can't use

Re: [PHP] How to find random records in a subset?

2005-06-03 Thread Marek Kilimajer
Brian Dunning wrote: On Jun 3, 2005, at 6:48 AM, Marek Kilimajer wrote: Brian Dunning wrote: I am using a routine to find 50 random records in a large MySQL database (about a million records) where I generate a list of 50 random unique ID's, why can't you use the where condition

Re: [PHP] sanitizing get vars

2005-06-02 Thread Marek Kilimajer
Sebastian wrote: what is a safe way to clean a post/get before echoing it. example. input form, user enters some text, hits enter. .. next page i echo what they entered. right now i just run the variables passed by htmlentities() which preseves any html. is that acceptable? You might also

Re: [PHP] if(($mydata-address

2005-06-01 Thread Marek Kilimajer
John Taylor-Johnston wrote: This should be easy, but refuses to work: if( ($mydata-address != ) and ($mydata-addresspublic == yes) ) { } But in other combinations, they work? if($mydata-address != ){} or if($mydata-addresspublic == yes){} So what new lesson am I to learn now? :) in both

Re: [PHP] what is -- $this variable - $this other variable -- means?

2005-06-01 Thread Marek Kilimajer
...helmut wrote: What does $this variable - $this other variable Means? I have seen it and i have used but I am not sure what exactly it means in regular English or Spanish wording that is. read about variable variables -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] what is -- $this variable - $this other variable -- means?

2005-06-01 Thread Marek Kilimajer
Richard Davey wrote: Hello Marek, Wednesday, June 1, 2005, 9:48:36 PM, you wrote: What does $this variable - $this other variable Means? MK read about variable variables Wouldn't that be $$variable? :) It looks like an object method request to me. I thought this was covered in that

Re: [PHP] Re: Same sessions / different domains

2005-05-30 Thread Marek Kilimajer
mbneto wrote: Hi Richard, The setcookie manual and the cookie specification tells otherwise. bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure] ) the domain parameter is restricted to third level domains (or 4 for top level domains

Re: [PHP] novice: how to run .sql script from php?

2005-05-29 Thread Marek Kilimajer
tony yau wrote: I realised that there is a fundamental problem with using mysql_query( ...) to run a .sql script to setup a database, and that was the database needs to be there in the first place for php to connect to! also there was a lot of comment lines in the script that was causing

Re: [PHP] Recursion: Ugh!

2005-05-26 Thread Marek Kilimajer
Chris W. Parker wrote: Hi everyone, I've been working on a problem for a few days now and I'm not making any headway so I think it's time I come to the list for some help (though this really disappoints me since it appears I'm not capable of solving this problem on my own!). Anyway, I'm using

Re: [PHP] Very long delay posting to php-general (might be OT)

2005-05-25 Thread Marek Kilimajer
Richard Lynch wrote: On Tue, May 24, 2005 3:32 pm, Marek Kilimajer said: Andy Pieters wrote: Hi all I was wondering if it is normal that when posting to the php-general list there is always a very long delay before messages are shown. It's not like with snail mail. Sending mail messages

Re: [Fwd: Re: Re: [PHP] Re: Re: Re: __get() not reentrant?]

2005-05-24 Thread Marek Kilimajer
Christophe Chisogne wrote: Jochem Maas a écrit : if someone with access to the webserver hosting jnsolutions.co.uk could do a quick rm -rf /home/jnsoluti/.autorespond that would be great :-) To that someone, here's the admin URL (cPanel 9) if you forgot it :) http://jnsolutions.co.uk:2082/

Re: [PHP] Very long delay posting to php-general (might be OT)

2005-05-24 Thread Marek Kilimajer
Andy Pieters wrote: Hi all I was wondering if it is normal that when posting to the php-general list there is always a very long delay before messages are shown. It's not like with snail mail. Sending mail messages is instant so where is the delay? I think John Nichel took over the job

Re: [PHP] Requiring stuff question

2005-05-23 Thread Marek Kilimajer
Robert wrote: I have the following in a config file: // Define and require the Smarty library define('SMARTY_DIR', 'Smarty/'); require(SMARTY_DIR . 'Smarty.class.php'); // Define the pager stuff define('PAGER_DIR', 'Pager/'); require(PAGER_DIR . 'Pager.php'); require(PAGER_DIR .

Re: [PHP] Re: __get() not reentrant?

2005-05-22 Thread Marek Kilimajer
Christopher J. Bottaro wrote: Jochem Maas wrote: Christopher J. Bottaro wrote: Maybe I'm using reentrant incorrectly, but here is what I mean... class Test { function __get($nm) { if ($nm == 'x') return $this-func(); elseif ($nm == 'y') return 'y'; elseif

Re: [PHP] update blues

2005-05-21 Thread Marek Kilimajer
Jim Sara Feldman wrote: Hi: I have a partially finished app using PHP and MySQL that runs on Mac G4 running System 10.3.9. Undoubtedly, I upgraded too many things all at the same time. Something broke. PHP and MySQL are both running. I can use the latest phpMyADMIN and everything is there

Re: [PHP] Image Verification - Problems in Safari, Mac OS X

2005-05-21 Thread Marek Kilimajer
Richard Lynch wrote: On Thu, May 19, 2005 6:05 am, Rahul S. Johari said: I did actually remove the Header which declared it as a Image/PNG and everything seemed to work in both the browsers. Great. Now it works in 2 browsers, and breaks in 237. You MUST separate the two. Actualy he

Re: [PHP] Japanese Fonts in php

2005-05-20 Thread Marek Kilimajer
Mark Sargent wrote: Hi All, how would one get them to display in php pages..? Is it like ASP where you have to set a codepage number..? I've set this at the top of my pages, html lang=Shift_JIS and this for the font font type=\Shift_JIS\$product_data_output/font I don't claim to know much about

Re: [PHP] Image Verification - Problems in Safari, Mac OS X

2005-05-19 Thread Marek Kilimajer
Rahul S. Johari wrote: On 5/18/05 6:23 PM, Marek Kilimajer [EMAIL PROTECTED] wrote: BTW, you might not be concerned about it much, but you have a race condition in your script. Ave, What do you mean by race condition ? If more then one user is accesing the page, you might overwrite the first

Re: [PHP] Refresh (F5) adds another SQL record.

2005-05-18 Thread Marek Kilimajer
Robert Meyer wrote: Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Robert Meyer wrote: Hello, Scenario: 1) User is presented a blank form. 2) User fills in form. 3) User submits form. 4) Record is added to database. 5) Back to 1). Go really back to 1) - use redirect

Re: [PHP] Image Verification - Problems in Safari, Mac OS X

2005-05-18 Thread Marek Kilimajer
Rahul S. Johari wrote: Ave, A simple Image Verification script is working perfect in IE on Windows... But isn¹t working in Safari on Mac OS X! It displays a blank page instead of the image with the form. Here¹ s the Script: ? header(Content-Type: image/png); Because only Safari gets it right. With

Re: [PHP] Refresh (F5) adds another SQL record.

2005-05-17 Thread Marek Kilimajer
Robert Meyer wrote: Hello, Scenario: 1) User is presented a blank form. 2) User fills in form. 3) User submits form. 4) Record is added to database. 5) Back to 1). Go really back to 1) - use redirect. After the record is added to the database, use something like: header('Location:

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Marek Kilimajer
Ville Mattila wrote: Leif Gregory wrote: session_destroy(); session_start(); session_write_close(); Header(Location: ...); exit; I never tried regenerate. Just started a new session again. Hi Leif! Thanks for your reply. For some strange reason, this works not for me. The session cookie will not

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Marek Kilimajer
Ville Mattila wrote: Marek Kilimajer wrote: the cookie variable still persists. you need to uset($_REQUEST[session_name()], $_COOKIES[session_name()] ...); Thanks Marek for a reply. I'm not sure but I have been thinking that unset($_COOKIES) does not destroy the cookie from the client side

Re: [PHP] Re: I have some upload questions.

2005-05-16 Thread Marek Kilimajer
Lee Chen wrote: Thanks for all of your helping. I think now maybe it's not the serve's problem because I CAN post forms and even I can upload some smaller size files. Then the following is my problem: This is the script of justtest.php : justtest.php ?php if

Re: [PHP] Add to array problem

2005-05-16 Thread Marek Kilimajer
mayo wrote: I'm having a little problem adding to an array. Each time I add to an array it wipes what was previously added. I'm using array_push(). $items=array(); $items=array_push($items, $_POST[whatever]); I'm missing something easy. thx array_push() returns the number of elements in

Re: [PHP] what am I missing..interpolation?

2005-05-15 Thread Marek Kilimajer
blackwater dev wrote: Hello, this works fine: $name=fido; $string=my dog's name is $name; echo $string;//prints my dog's name is fido but when I store the string my dog's name is $name in the db and pull it out: //do the query $row=$datab-fetch(); $name=fido; $string=$name['db_column']; echo

Re: [PHP] I have some upload questions.

2005-05-15 Thread Marek Kilimajer
Lee Chen wrote: If the server uses hub ( to make more computer connect online), can' I upload files to that server?? if you can post forms, you can upload files. I face a problem like this , and I think that's the hub causing this problem. Did it? what is like this? -- PHP General Mailing List

Re: [PHP] Re: Same sessions / different domains

2005-05-14 Thread Marek Kilimajer
Richard Lynch wrote: On Fri, May 13, 2005 1:06 am, Marek Kilimajer said: Richard Lynch wrote: On Thu, May 12, 2005 6:58 am, Shaun said: $_SERVER['HTTP_HOST'] Mbneto [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need to access a website (written in php) using two different

Re: [PHP] MySql injections (related question)

2005-05-14 Thread Marek Kilimajer
Richard Lynch wrote: On Fri, May 13, 2005 12:51 am, Marek Kilimajer said: Richard Lynch wrote: On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single

Re: [PHP] Finding current PHP sessions

2005-05-14 Thread Marek Kilimajer
Bogdan Stancescu wrote: Ok, I went with the solution you recommended, by the way of a thank you to the list, here's the resulting function: /** * This function returns the IDs of the current PHP sessions. * At this time, it only works with * [EMAIL PROTECTED]

Re: [PHP] MySql injections (related question)

2005-05-13 Thread Marek Kilimajer
Richard Lynch wrote: On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single quote is exactly what your database considers to be a single quote. If these

Re: [PHP] Re: Same sessions / different domains

2005-05-13 Thread Marek Kilimajer
Richard Lynch wrote: On Thu, May 12, 2005 6:58 am, Shaun said: $_SERVER['HTTP_HOST'] Mbneto [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need to access a website (written in php) using two different domains (www.foo.com and www.bar.com). I must see the same content. Since the

Re: [PHP] Finding current PHP sessions

2005-05-13 Thread Marek Kilimajer
Bogdan Stancescu wrote: Hello all, I guess this comes up once in a while, does anybody know how I can find the current PHP sessions' IDs? I don't mind if some have passed away, and the PHP gc hasn't run yet, because I'm doing a garbage collection of my own, for data identified by session ID --

Re: [PHP] strpos with array?

2005-05-13 Thread Marek Kilimajer
Burhan Khalid wrote: Merlin wrote: Burhan Khalid wrote: Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array(picture, pics); $pos = strpos ($term, $replace); //if

Re: [PHP] Same sessions / different domains

2005-05-12 Thread Marek Kilimajer
mbneto wrote: Hi, I need to access a website (written in php) using two different domains (www.foo.com and www.bar.com). I must see the same content. Since the site uses session and cookie variables I was wondering if (and how) it's possible to create a session id that is valid for the domains

Re: [PHP] Passing variable number of parameters by reference

2005-05-12 Thread Marek Kilimajer
I believe it's mentioned somewhere in the manual you can't do that. func_get_arg() always return a copy. You can workaround this using an array. Robert Meyer wrote: Hello, Using: PHP Version 5.0.3 I build the following function: function Set4HTMLOut() { $C = func_num_args(); for

Re: [PHP] marking words bold

2005-05-11 Thread Marek Kilimajer
Merlin wrote: Hi there, I am trying to mark words inside a sentence bold. Problem is, if there is an overlap it does not work anymore. I am using this code: $t = str_replace($word, b$word/b, $text); For eample: Mark those words bold: adventure in singapore Text: My adventure flying to singapore

Re: [PHP] using header ('Location:) to pass varaiables

2005-05-10 Thread Marek Kilimajer
Ross wrote: Is it possible to send variables using header() ? I have tried variations on the theme header ('Location: email_confirm.php?email=$email); but nothing seems to work. I don't know what you tried, but the above results in parse error. Try: header (Location:

Re: [PHP] strpos with array?

2005-05-10 Thread Marek Kilimajer
Merlin wrote: Hi there, I am wondering if there is a function (I could not find) which does the same thing like strpos does, but with an array. For example: $replace = array(picture, pics); $pos = strpos ($term, $replace); if ($pos !== false) { $term = str_replace($replace, ,

Re: [PHP] Editing PDF

2005-05-10 Thread Marek Kilimajer
Sam Smith wrote: I have an existing PDF file that I want to add text to or make changes to text with data from an HTML form via PHP. The PDF looks like this: 20 0 obj/Length 5586/Filter[/ASCII85Decode/FlateDecode]stream 8;X-DgMYb:(An746bc%oU,Mo*Snfn`(:.P:CnHNZLL%2;CCTp,[EMAIL PROTECTED]'+2VqIkV

Re: [PHP] text with $

2005-05-09 Thread Marek Kilimajer
Martín Marqués wrote: I have a text variable that contains $ symbols, that when I pass it out PHP thinks that the $ mean that a variable name comes right after. I tried escaping the $ put with no luck. Is there something I can do? How did you escape the symbol? You should use backslash: \ Or

Re: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread Marek Kilimajer
George Pitcher wrote: Hi guys, I'm doing something dumb but I can't see it. The basic premise is: sql search of orders sorted by customer set g_customer_id to '' loop through resultset if customer_id not same as last record's customer_id (g_customer_id) get customer email details set up

Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Marek Kilimajer
Murray @ PlanetThoughtful wrote: Hi All, I need to implement the ability to ftp upload files from client machines via a form in a web application I'm developing. From reading the PHP help, all I can find to perform this is the POST method for handling file uploads

Re: [PHP] API Number

2005-05-08 Thread Marek Kilimajer
Cole Ashcraft wrote: Hi. I need to know what PHP version had API # 20001222. Thanks, Cole 4.0.5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Random but ordered..

2005-05-07 Thread Marek Kilimajer
Ryan A wrote: Hey, I have been screwing around with this code for around a day and am hitting a wall, any help would be appreciated. Basically, I am working on a site that queries the DB for companies and the plans the company is offering, the DB is quite big (a few thousand records in each of the

Re: [PHP] POST long texts to PHP

2005-05-07 Thread Marek Kilimajer
First of all, don't hijack threads. Instead of replying to a message, create a new one. SED wrote: I need to POST long texts through a form to PHP but the text cuts down to around 64.000 characters. Is there any way to allow longer texts (like in php.ini)? This is browser limit. Most, if not

Re: [PHP] Reducing size of htm output

2005-05-06 Thread Marek Kilimajer
Kirsten wrote: preg_replace('/s+/', ' ', $html); but watch out, this js code will work: var v alert(v) this one will not: var v alert(v) Sure but now: how do I access the htm output of the current executing script before it is send to the user? output buffering -- PHP General Mailing List

Re: [PHP] sort by date

2005-05-06 Thread Marek Kilimajer
William Stokes wrote: Hello, I made a mistake and stored date information to DB as varchar values (dd.mm.yyy). When I read the DB is it still possible to sort the data by date with SQL query (ORDER BY date ASC)? Or is it nessessary to have the date information to be stored as a date in the DB?

Re: [PHP] multi dimensional arraySOLVED

2005-05-06 Thread Marek Kilimajer
Angelo Zanetti wrote: thanks richard. In the PHP.ini its set to on but in the .htaccess file we've set it to OFF. could this still be causing the problem?? run phpinfo() inside the directory thanks again Angelo Zanetti Z Logic www.zlogic.co.za [c] +27 72 441 3355 [t] +27 21 469 1052 Richard Lynch

Re: [PHP] Reducing size of htm output

2005-05-06 Thread Marek Kilimajer
Kirsten wrote: I need to reduce the size of the HTM generated by a PHP script for faster transmission. I'm actually using ob_start(ob_gzhandler) but I also need some function to reduce the size of javascript blocks, deletion of unnecesary blanks, etc. For example, Code A: headscript function

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
David Christensen wrote: I know I'm missing something, but I can't seem to find it or figure it out. I've done the google search, and I've done a quick scan of the list archives, but I can't seem to find the right way to remove control-M from a form submission page with textarea fields. I have a

Re: [PHP] How to declare Vars in PHP?

2005-05-05 Thread Marek Kilimajer
Jon M. wrote: I know it's not necessary, but I still want to know how. I know in JavaScript, that you declare vars like so: var = variableName; So I'm assuming that in PHP you do it like this: var = $variableName; the above is wrong. you can declare variable inside class definition using (php4):

Re: [PHP] insert not working

2005-05-05 Thread Marek Kilimajer
Ross wrote: $query = INSERT INTO sheet1 (title, fname, sname, job_title, organisation, street, postcode, city, telephone, mobile, fax, email, web, add_info) VALUES ('$title', '$fname', '$sname', '$job_title', '$organisation', '$street', '$postcode', '$city', '$telephone', '$mobile', '$fax',

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
/' before all newline characters. I'm currently using: $_POST[$field] = str_replace(\r\n, \n, $_POST[$field]); $_POST[$field] = strip_tags($_POST[$field], 'br /'); in a foreach loop for all the $_POST vars, but it's still not removing it. Dave On Thu, 2005-05-05 at 10:12 +0200, Marek

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
to be somewhere. Or are you using any htmlarea kind of input? We need to see your form.php to help you. On Thu, 2005-05-05 at 16:11 +0200, Marek Kilimajer wrote: David Christensen wrote: Actually, I forgot to also mention that the browser is changing the control-M (^M) from the query when it sets

Re: [PHP] RE: Finding out their server type

2005-05-04 Thread Marek Kilimajer
Ang Pinoy wrote: Such as Apache, IIS, GWS, etc. Server header in any http response from the server: $ telnet servername 80 HEAD / HTTP/1.0 200 OK Connection: close Date: Wed, 04 May 2005 15:00:55 GMT Accept-Ranges: bytes ETag: fa878-22dd-422b6d78 Server: Apache/1.3.27 -- PHP General Mailing

Re: [PHP] just going with LIKE

2005-05-02 Thread Marek Kilimajer
Ross wrote: Had a look at it and much easier to use LIKE with wildcards. Was unsure whether the query was case sensitive that is why I asked. As it turns out it is not. LIKE is case insensitive as well. Try casting to binary, this should work. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php5-mysqli

2005-05-01 Thread Marek Kilimajer
NSK wrote: hi how can I ensure that php5-mysqli is correctly loaded? the server is SuSE9.3 and I have installed the package from yast, but one app (phpmyadmin) says it cannot find the mysql extension (although other apps can query the db). which config files are responsible for loading mysqli

Re: [PHP] inserting an auto incemented column in table already created

2005-04-30 Thread Marek Kilimajer
Ross Hulford wrote: Hi, I have a table with 15 columns or so that has been inherited from an older db and am trying to insert an auto increment column (in mysql) without having to number it manually. This is fine when I add new colums via a form but the old entries have a null value

Re: [PHP] Skipping function arguments!

2005-04-28 Thread Marek Kilimajer
Vedanta Barooah wrote: Hello All, Cosider this : function add($a=1,$b=2,$c=3){ return $a + $b + $c; } how do i skip the second argument while calling the function, is there a process like this: echo add(1,,1); # where i expect 2 to be printed, php does not support this. you can workaround

Re: [PHP] Skipping function arguments!

2005-04-28 Thread Marek Kilimajer
Bostjan Skufca @ domenca.com wrote: function add ($a=1, $b=2, $c=3) { return $a + $b + $c; } add(1, null, 1); will do just fine returns 2, OP wants 4 IMO r., Bostjan On Thursday 28 April 2005 14:16, Marek Kilimajer wrote: Vedanta Barooah wrote: Hello All, Cosider this : function add

Re: [PHP] Skipping function arguments!

2005-04-28 Thread Marek Kilimajer
Vedanta Barooah wrote: Well that was simple, but this is what i am trying to solve: if you refer to the php documentation for ldap_open() function it says: resource ldap_search ( resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int

Re: [PHP] JavaScript - object property

2005-04-27 Thread Marek Kilimajer
Eli wrote: Hi, I know this is not the forum, but I googled and couldn't find it, so please try to help me with this. /*/ function MyCls(name) { this.name=name; } function SayHi() { alert('Hi, '+this.name+'!'); } var obj=new MyCls('PHP'); obj.name='JavaScript'; //this will call

Re: [PHP] appending to a file using ftp functions

2005-04-27 Thread Marek Kilimajer
Giulio wrote: Hi, I'm developing an application that uploads file to a server using http. the app calls a php on the server sending all the data just like a web form post. It works just fine uploading little files, now i'm concerning about having the apllication split large files in little

Re: [PHP] appending to a file using ftp functions

2005-04-27 Thread Marek Kilimajer
Giulio wrote: I tryied using ftp_put() with startpos parameter, but I receive an error Appen/Restart not permitted, try again I tryed both FTP_AUTOSEEK on and off, and both pasv true and false I imagine that this is an ftp server error message, and not a php error, since I have searched it on

Re: [PHP] appending to a file using ftp functions

2005-04-27 Thread Marek Kilimajer
Giulio wrote: I tryied using ftp_put() with startpos parameter, but I receive an error Appen/Restart not permitted, try again http://www.proftpd.org/docs/faq/linked/faq-ch4.html#AEN408 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 32 bit PNG (256 color alpha channel), TGA images, etc

2005-04-20 Thread Marek Kilimajer
Andrew D. Keyser wrote: I find it not quite right that imagecolorallocatealpha is limited to 128 levels right now (0-127) ... the png format can support 256 with true 32bit images. I am concerned about this because I am using php to make an application that loads a nonstandard image format

Re: [PHP] php output fills apache buffer for clients with slow internet connections

2005-04-19 Thread Marek Kilimajer
Martin Mandl wrote: Dear Ladies and Gentlemen, the last couple of days I browsed the internet for the answer of a questions which seems to be a common problem ... but found now real solution: I would like to serve large files (100MB) to my clients using php: while (moreDataAvailable()) {

  1   2   3   4   5   6   7   8   9   10   >