[PHP] Re: Custom Open Tags

2004-12-03 Thread Red Wingate
Hi Sven, i was in the need to allow #sim"Â,Â$contentÂ,Â$source_partsÂ); foreachÂ(Â$source_parts[1]ÂASÂ$idÂ=>Â$php_sourceÂ)Â{ ob_start();Â eval(Âereg_replace(Â"\\$([a-zA-Z_][a-zA-Z0-9_]*)"Â, "\$GLOBALS[\"\\1\"]" , $php_source ) ); $contentÂ=Âstr_replace(Â$source_parts[0]

[PHP] Re: Display only one filed of the repeated records

2004-11-30 Thread Red Wingate
Hi Ahmed, hope this helps: $ary = array() ; $sql = "SELECT COUNT(*), category FROM movies GROUP BY category" ; $res = mysql_query ( $sql ) ; while ( $line = mysql_fetch_assoc ( $res ) ) { $ary[] = $line[ 'category' ] ; } echo implode ( " - " , $ary ) ; -- red Ahmed Abdel-Aliem wrote: >

[PHP] Re: Globally accessible objects without using 'global $obj;'

2004-11-12 Thread Red Wingate
Hi Chris, Something that worked out very well for me was using a function that would take care of the error handling ... kind of define ( 'ERR_TYPE_ERROR' , 1 ) ; define ( 'ERR_TYPE_WARNING' , 2 ) ; class Error { // error handling code here } function _handleError ( $msg , $type ) { static

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent wrote: So,

[PHP] Re: PHP5 and pass by reference bug.

2004-07-16 Thread Red Wingate
Maybe you recheck the dokumentation on what exactly referenzes are. Do you expect the function to alter the string "something here" and every- time you later print the string within your script you get the altered one? ONLY variables can be passed by referenze ! -- red Daevid Vincent wrote: So,

Re: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Red Wingate
http://de2.php.net/manual/en/function.is-writeable.php Jay Blanchard wrote: [snip] How do we tell if the file is already locked when someone use a flock() on the file?? [/snip] If your flock attempt returns FALSE then it is likely locked already -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Oh guess it would be even better and faster to only use: /Last Name:([^\n]*)/ and trim() the result :-) -- red Red Wingate wrote: Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end of the next line ! Tim Van Wassenhove wrote: In article <[EMAIL PROTECTED]>, Arik Raffael Funke wrote: implement following pattern

[PHP] Re: PHP5 release HTTP Authentication not working on FreeBSD.

2004-07-15 Thread Red Wingate
known problem, will be fixed soon in 5.0.1 which should be released asap William Bailey wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Guys, I've just upgraded from 5.0 rc3 to 5.0 release on freeBSD (using the ports) and now find that HTTP Authentication dosent work. Here is the te

[PHP] Re: ereg question/prob...

2004-07-15 Thread Red Wingate
$regs is an array not a string ! try print_r or var_dump to determine $regexp's content Tim Van Wassenhove wrote: In article <[EMAIL PROTECTED]>, Bruce wrote: $file = ".txt"; ereg("(\.)([a-z0-9]{3,5})$", $file, $regs); echo " ww = ".$regs. ""; i'm trying to figure out how to get the portion of

[PHP] Re: Compile Php5: --with-mysql and --with-mysqli

2004-07-14 Thread Red Wingate
[quote src="doc"] If you would like to install the mysql extension along with the mysqli extension you have to use the same client library to avoid any conflicts. [/quote] Jacob Friis Larsen wrote: > How do I install Php5 with both --with-mysql and --with-mysqli? > > MySQL is 4.1.3-beta and inst

[PHP] Re: warning: function registration failed

2004-07-12 Thread Red Wingate
Try a clean install of PHP5 otherwise head over to the interals list to make sure it won't be a showstopper for the Release sceduled for today. -- red Josh Close wrote: I installed php-5.0.0 and I get these error when doing "php -v" PHP Warning: Function registration failed - duplicate name - mss

Re: [PHP] safe mode/open basedir not working ?

2004-06-30 Thread Red Wingate
Thats just what he said :p Robert Mena wrote: Marek, but the program was executed using a system call from a php script. - rt On Wed, 30 Jun 2004 23:50:02 +0200, Marek Kilimajer <[EMAIL PROTECTED]> wrote: robert mena wrote --- napísal:: Hi, I host a few virtual domains in apache 2 and use php. The

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
Buddy, nobody ( and especialy not me ) would have offended you, if you wouldn't have flamed someone for creating a new thread by replying to another. Your E-Mail client breaks the Threads just like he did which makes reading the threads a pita. It was stated more then once that replying useing any

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
Usually it should be \\\ to get a \ ... now lets take a look at your regexp /^[a-zA-Z0-9\(\)]{1}[ a-zA-Z0-9\(\)_\,\.\-\'\"]{1,999}$/ ^[a-zA-Z0-9()] should work, as ( and ) only needs to be escaped when not within an []-block (cannot recall the name right now) [- a-zA-Z0-9(),.'\"\\\_]{1,999}$ s

Re: [PHP] Messages to List Being Truncated

2004-06-30 Thread Red Wingate
the first one was truncated but the second one was complete. Btw thx Chris for opening up yet another thread that could have been avoided if your client was configured correctly. -- red Chris W. Parker wrote: Pablo Gosse on Wednesday, June 30, 2004 2:29 PM said: Hi

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
yep, as i said it was displayed correctly everywhere expect in the forms oh i might mention - Mozilla worked well but IE destroyed the data (only in textareas) Torsten Roehr wrote: "Red Wingate" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [] Hi Red, I'm

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
[] Hi Red, I'm actually working on a project as well at the moment that uses utf8 data in MySQL. All chars should be OK when output with utf8_decode(). Do the chars only look wrong within textarea or also outside of form elements? [] Actually everything ( expect one language ... i guess it

Re: [PHP] problem with embeded objects and reference

2004-06-30 Thread Red Wingate
better don't blame the other pal :-) http://screens.erisx.de/reply.gif -- red Red Wingate wrote: so, why don't you reply correctly? :p Chris W. Parker wrote: Vincent DUPONT <mailto:[EMAIL PROTECTED]> on Wednesday, June 30, 2004 1:05 PM said: Hi, hi. could anyone help on th

Re: [PHP] problem with embeded objects and reference

2004-06-30 Thread Red Wingate
so, why don't you reply correctly? :p Chris W. Parker wrote: Vincent DUPONT on Wednesday, June 30, 2004 1:05 PM said: Hi, hi. could anyone help on this 'by reference' problem. when starting a new thread please do not just reply to an ongoing thread and change the

[PHP] Re: problem with embeded objects and reference

2004-06-30 Thread Red Wingate
not the same objects ( equal but not same ). So i guess you need to -$main->setChild($child1); +$main->setChild(&$child1); and -$this->child = $child; +$this->child =& $child; // MUST !!! Now i see, $this->child = $child; copys the object instead of creating a ref. -- red Re

[PHP] Re: problem with embeded objects and reference

2004-06-30 Thread Red Wingate
Not sure over here, but isn't it $main->setChild(&$child1); Vincent Dupont wrote: Hi, could anyone help on this 'by reference' problem. I have 2 classes. The main class as a child class. The child class has properties (array) I would like to be able to manipulate the child's properties even after t

Re: [PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Red Wingate
[...] Bummer, mysql_escape_string() is available only in PHP 5 and up. I'm using PHP 4.3.1 [...] *mo* - wrong [quote] mysql_escape_string (PHP 4 >= 4.0.3, PHP 5) [/quote] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
[...] Can't you use utf8_decode() to display the utf8 encoded data? [...] The displayed data worked out fine for some languages but others didn't and even simple german chars like äöü won't show up correctly within a textarea. [...] Is this what you're looking for?: http://de2.php.net/manual/en/fun

[PHP] Converting strings to match multiple charsets

2004-06-30 Thread Red Wingate
Hey guys, i ran into serious trouble when facing the problem to convert data, which was retrieved from a single form in our CMS to match the requirements of multiple charsets. Our CMS uses UTF-8 which worked out quite fine to display the data but caused weired symbols when displayed within a TEXTAR

[PHP] Re: Earliest PHP/FI

2004-06-30 Thread Red Wingate
maybe take a look here : http://museum.php.net/ otherwise do some research using google. Jeff Loiselle wrote: Does anyone know where I would be able to find the earliest version of PHP/FI or PHP possible? I am looking for the earliest possible version for academic reasons. Thanks in advace. -- P

[PHP] Re: How to escape apostrophe in HTML textbox exactly???

2004-06-30 Thread Red Wingate
use " to display the data in the input-text element and undo this before inserting it into the database function quoteToHtml ( $string ) { return str_replace( '"' , '"' , $string ); } function htmlToQuote ( $string ) { return str_replace( '"' , '"' , $string ); } Only way to go :-) Scott Fletch

Re: [PHP] Protecting database passwords

2004-06-30 Thread Red Wingate
even for the guy who wrote the source. it's allmost impossible to restore the data as the only option is a brute-force attempt. Chris W. Parker wrote: Red Wingate <mailto:[EMAIL PROTECTED]> on Wednesday, June 30, 2004 9:33 AM said: Hashing ... but i guess he wants to protected t

Re: [PHP] Protecting database passwords

2004-06-30 Thread Red Wingate
Hashing ... but i guess he wants to protected the password needed to access the DB not a PW stored in the DB. [...] MD5 - http://ie2.php.net/md5 One way in encryption. [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fw: [PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
Oh ... you forgot to include your account-info so i won't be able to send you the money :-/ [...] You're too nice.. Btw, I need some money. Send me money ASAP. It must be an amount greater than $200, and be delivered to me directly, thank you. [...] -- PHP General Mailing List (http://www.php.net/)

Re: Fw: [PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
Sender ( $string ); $sender = array_map ( 'htmlspecialchars' , $sender ) ; print_r ( $sender ); } echo ''; } debug_FetchSender ( array ( 'FROM: Red Wingate <[EMAIL PROTECTED]>' , 'FROM: Red Wingate' , 'FROM: [EMAIL PROTECTED]&

[PHP] Re: Regular expression

2004-06-30 Thread Red Wingate
match( '#^from\s*:\s*([^>]+)(<([^>]+)>)?#si' ,$emailLine ,$parts ); break ; } } $name = $parts[1] ; $email = $parts[3] ; But you should consider the following: FROM: Red Wingate <[EMAIL PROTECTED]> FROM: Red Wingate FROM: [EMAIL PROTECTED] . Which makes working like this a

[PHP] Re: Saving variables in a session in a destructor

2004-06-30 Thread Red Wingate
Maybe you check out the internals archives as an discussion about this topic was held 1-2 days ago. > Hi all > > Using PHP5, I am trying to save some properties of an object when it > is destroyed in its destructor, __destruct(). However, I have found > that the session variable is NOT stored un

Re: [PHP] Question about executing PHP script

2004-06-29 Thread Red Wingate
Yep :-) [...] > can I do a #!/usr/bin/php -q at the begining of the text file? [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session file in /tmp

2004-06-29 Thread Red Wingate
i guess what u are looking for is session_destroy(); Binay wrote: > If i m getting ur problem correctly then u want to restrict the same user > logging from different machines concurrently. If tht being the case the > snippet u mentioned below alone won't solve the problem . you have > maintain a

Re: [PHP] Image Problem

2004-06-28 Thread Red Wingate
Read: The best database to store images in is the Filesystem because thats what it's for :-) Raditha Dissanayake wrote: Monil Chheda wrote: Hi, I store images in DB properly... no issues using the Storing an image directly in the database certainly isnt' the proper way of doing it :-) The com

[PHP] Re: Image support

2004-06-28 Thread Red Wingate
RTFM Gus wrote: I have PHP 4.3.6 I want to add image support to manipulate JPEGs. I downloaded http://www.boutell.com/gd but what I do next? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Works in Mozilla, not in IE

2004-06-28 Thread Red Wingate
I wish there wouldn't be so many ppl using IE anyway :) Matthew Sims wrote: * Thus wrote Robert Sossomon: That just put me right back at the beginning, IE trying to DL the PHP page... put your disposition back to attachment and send the vnd.ms-excel content type. Also, on how the behaviour IE will

Re: [PHP] OOP, Classes, Sharing Code

2004-06-28 Thread Red Wingate
Look correct from my point of view... class Portfolio { var $portfolioID ; var $albums = array () ; function Portfolio ( $newID ) { $this->portfolioID = $newID ; } function addAlbum ( $album ) { $this->albums[] = $album ; } function getAlbum () { return curren

[PHP] Re: OT?? -> calling frames within frames

2004-06-18 Thread Red Wingate
Allright, even if it's OT Many ways to handle it, first would be to add a function within the frameset which handles redirects to the frames: function handleFrameRedirect ( frame , url ) { document.frames[ frame ].document.location.href = url ; } Within the frame you use par

Re: [PHP] Can I detect size of files which are too large to upload?

2004-06-18 Thread Red Wingate
Right, guess i saw some kind of JS that determined the size of the selected file and wrote it into an hidden field. Maybe you try it that way. -- red Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the file

[PHP] Re: Unit Testing

2004-06-16 Thread Red Wingate
Allmost forgot about this one: http://www.phppatterns.com/index.php/article/articleview/33/1/2/ very well written ( phpPatterns() ) covers some other nice topics as well, allways worth a read. -- red Red Wingate wrote: Used all but 'Generic PHP Framework' and everything was quite fine

[PHP] Re: Unit Testing

2004-06-16 Thread Red Wingate
Used all but 'Generic PHP Framework' and everything was quite fine and worked out just as i expected. But i was still missing some features which made me build my own small library to fit into my Framework. -- red Rick Fletcher wrote: Has anyone done any PHP unit testing? I've been looking around

[PHP] Re: file knowing its own directory

2004-06-09 Thread Red Wingate
the magic constant __FILE__ will give you the absolut filesystem location of the file it is called. Eg: /home/www/tests/foo.php -> will print: '/home/www/tests/foo.php'; to retrieve the path only you could do: /home/www/tests/foo.php -> will print: '/home/www/tests/'; hope this helps :-) Dennis

Re: [PHP] Expedia.com

2004-06-09 Thread Red Wingate
Allmost, after having a quick look at the source i tell you they do it like that: ... loading stuff here ... page loading here done? JS: document.getElementByid('loading').display='none'; take a look for yourself :-) James Harrell wrote: Hi Rene, Here's a thought- make your anim

[PHP] Re: MySQL equivalent for odbc_result_all()???????

2004-06-09 Thread Red Wingate
Some old piece of source i found in my libs: function sql_dump_result ( $result ) { $line = ''; $head = ''; while ( $temp = mysql_fetch_assoc( $result ) ){ if ( empty ( $head ) ) { $keys = array_keys($temp); $head = ''.implode('',$keys).''; } $line .= ''.implode(''

Re: [PHP] Multiple substring replacement

2004-05-24 Thread Red Wingate
In this special case you would even use 'file' to read the content of the file into an array and use 'implode' to replace every \n with $content = implode( "" , file ( './my_file.txt' ) ); -- red Brent Baisley wrote: Normally, I would say str_replace(), but for converting "\n" to "", use the nl2

[PHP] Re: Sorting text with multibyte characters

2004-05-01 Thread Red Wingate
Run into this before, PHP seams to do quite well when you set the locale right ( de_DE ) which will place AÄBCD instead of ABCDÄÖÜ. Hope this helps :-) -- red Michal Migurski wrote: Hi, Does anyone have any thoughts on how to effectively sort text with multi byte characters? I am worki

[PHP] Re: Select from 24 tables

2004-05-01 Thread Red Wingate
First, this is a MySQL Question, next time you better send your request to a list which covers your type of question. use tablename.fieldname in your WHERE clause if you have fields with the same name. -- red Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each o

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
Pattern are always done using OOP, but phppatterns that is one of the best sources on this topic i could think of :-) -- red [] > Red, can you provide any more info or resources on a "registry-pattern"? > > I've found this: > http://www.phppatterns.com/index.php/article/articleview/75/1/1/ ,

Re: [PHP] Re: global vars inside includes inside functions?

2004-04-29 Thread Red Wingate
Again ain't no problem anyway foreach ( $GLOBALS AS $k => $v ) { $$k =& $GLOBALS[$k] ; } zap you are done ... again when using a function to include a file with relying on depts within the file you would most probably use a registry-pattern or similar to access the required variables. -- red

[PHP] Re: $_SERVER['SERVER_NAME'] in read-only.

2004-04-29 Thread Red Wingate
AFAIK the content of the superglobal variables cannot be changed ( even though i haven't found this in the docs i can remeber got beaten by PHP for doing so :-) ) Back to the problem ( if existent ): If you don't do stuff like '$_SERVER['SERVER_NAME'] = ;' inside your script you won't run into

Re: [PHP] OR

2004-04-25 Thread Red Wingate
BEEP wrong :) http://www.php.net/manual/en/language.operators.php#language.operators.precedence therefore: $a AND $b OR $c AND $d is not equal $a AND $b || $c AND $d but is equal to $a && $b || $c && $d -- red Evan Nemerson wrote: On Sunday 25 April 2004 12:14 am, Aidan Lister wrote: if (

[PHP] Re: How to do type/existence checking in PHP5

2004-04-23 Thread Red Wingate
Hi, this is a plain design fault on your side: allright, just set $a to be a string, thats allright, now you check wether an string-offset ( foo ) is an array or not which causes an FATAL ERROR on PHP5. Now if you wrote some clean code you would have done: Now this makes sense as you first

[PHP] Re: SQL Hell

2004-04-21 Thread Red Wingate
Guess some guys don't get the point of this posting or have no idea what foreign keys are about. This problem can easily be solved using JOINs -- red Lester Caine wrote: Jason Barnett wrote: So far I've made multiple statements pulling out all the data and using PHP to formulate the informatio

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
Curt Zirzow wrote: > * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): >> Justin Patrin wrote: >> >The threading works just fine. The problem is that users have ignorant >> >mail software that don't set the thread headers correctly. Even >> >newsgroup client software might do this. This is *not* the s

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
[...] > According to historical records, on Tue, 20 Apr 2004 18:31:19 +0200 Red > Wingate <[EMAIL PROTECTED]> wrote about "Re: [PHP] Why NNTP is not default > protocol for php groups": > >>[...] >>> That is mostly Outlook and OE that are real good at tra

[PHP] Re: Logic problem

2004-04-20 Thread Red Wingate
As foreach is a language-construct you cannot concat it to a string. try something like: $temp = '.'; foreach ( $array AS $key ) $temp .= ''.$key.''; $temp .= ''; instead --red [...] > Hi All, > > I am having a logic problem. (insert jokes here) I am trying to create a

RE: [PHP] Re: Converting XML into something PHP like....

2004-04-20 Thread Red Wingate
Nunners wrote: Array != Object echo $data->Title .''; echo $data->avail_dataset[0]->dept_date .''; etc. pp There are some examples on how to convert your XML-Dump into an Array check out the comments over at php.net -- red [...] > Hi Folks, > > At the end of the email is a var_dump of my XM

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
[...] > That is mostly Outlook and OE that are real good at trashing the Xref ... > others (old) clients do it too, but OE is the biggest sinner in that > aspect... (and Outlook runs on the OE engine when it comes to mail). [...] who is outlook ? :-) -- PHP General Mailing List (http://www.php.n

Re: [PHP] Re: <button> tag

2004-04-20 Thread Red Wingate
Try something like this: function submit_form( type ) { document.forms['submit_form'].elements['mode'].value = type; document.forms['submit_form'].submit(); } [...] > switch ($_POST['submit']) > { > case "edit": ... > case "new": ... > } [...] -- PHP General Mailing List

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
ttp://ircphp.com/users/imho/?file=function.str_chop.php > > Here's an example where PHP has explicitly wrapped at 80 chars, but only > the PHP, not the HTML. > http://ircphp.com/users/imho/ > > > > "Red Wingate" <[EMAIL PROTECTED]> wrote in message

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
I just build a testcase to check wether PHP does or not and it doesn't even if i have 1080 chars in a line :p -- red > No, PHP explicity inserts at 80chars > > > "Red Wingate" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Red

RE: [PHP] Unwanted e-mails

2004-04-20 Thread Red Wingate
[...] >> > but your messages *ARE* getting accepted otherwise i would not be >> > reading this email right now! >> >> NO THEY ARE NOT - This reply HAS to be sent via the newsgroup! >> >> The bounce messages I am getting are as a result of .php.net NOT >> accepting my perfectly valid posts! > > N

[PHP] Re: $PHP_SELF problem

2004-04-20 Thread Red Wingate
[EMAIL PROTECTED] wrote: > Hi > > $thisFileName = $PHP_SELF; works in a file just a few lines after the > program start. > > $thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self: > $PHP_SELF"); returns Debug: self: ) if it's within function > getNavigation() in the Navigation object calle

[PHP] Re: slow upload with http post

2004-04-20 Thread Red Wingate
Yavuz maFelak wrote: > Hello > I have a webserver that running php4.3.x,mysql3.5x,apache1.3.x on > Mandrake9. I intended to transfer this server to another server. > I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql > and concerning components. it works well. and I have a

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Red Wingate wrote: > Aidan Lister wrote: > >> Why do these functions wrap at approximately 80 chars? It's stupid! How >> can this be worked around? > > It doesn't check the source to see that the browser wraps the text as it > reaches the border of the w

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Aidan Lister wrote: > Why do these functions wrap at approximately 80 chars? It's stupid! How > can this be worked around? It doesn't check the source to see that the browser wraps the text as it reaches the border of the window. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Red Wingate
Is php.net bounceing your posts or does your ISP bounce your e-mails? maybe you could send us a copy to have a look? -- red Lester Caine wrote: > Chris W. Parker wrote: > >> but your messages *ARE* getting accepted otherwise i would not be >> reading this email right now! > > NO THEY ARE NOT

Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-19 Thread Red Wingate
Nice one here, got some class for this type of handling as well but it will also do some nice magic when it comes to checking for valid data or displaying the input again for validation :-) My way to go: 1. Display the form 2. Check all required fields (name start with req_) 2.1 ( ok ) Parse page

[PHP] Re: Flatten/Unflatten arrays

2004-04-19 Thread Red Wingate
Orangehairedboy wrote: Hi, check out http://php.net/serialize and http://php.net/unserialize . hope this helps :-) -- red [...] > Hi all, > > In Perl there is a way to flatten an array into a string, and a matching > function to unflatten the array. > > This is different from explode/implode

RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Red Wingate
Maybe you should take a look at PHPs Image functions, finding out which function matches your needs is not that hard :-) If you don't find the right functions you can also take a look at this list's archives as this topic was raised around 5 times 04/04 :-p -- red [...] > Hi Warren, > > Thanks

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works just fine for me :-) -- red Justin Patrin wrote: Curt Zirzow wrote: * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): Hello, I've seen this subject before, but never really got any answer. PHP have news server at news.php.net

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-19 Thread Red Wingate
Same here, just installed some Newsgroup Software and everything works just fine for me :-) -- red Justin Patrin wrote: Curt Zirzow wrote: * Thus wrote T. H. Grejc ([EMAIL PROTECTED]): Hello, I've seen this subject before, but never really got any answer. PHP have news server at news.php.net

AW: [PHP] example from meloni not working

2004-04-18 Thread Red Wingate
Execute $sql :) -- red -Ursprüngliche Nachricht- Von: Anthony Ritter [mailto:[EMAIL PROTECTED] Gesendet: Sunday, April 18, 2004 7:42 PM An: [EMAIL PROTECTED] Betreff: [PHP] example from meloni not working A basic ht counter script from Meloni's book on mysql (page 318). Not working fo

Re: [PHP] Bar/Line Graph Tool

2004-04-16 Thread Red Wingate
PEAR has some very nice Tools for this job :-) -- red [...] > Good morning gang, > > I'm looking for a snazzy line/bar graph class. I've got GD running, with > just the basic fonts (I'm using an ISP, so I can't do anything about it!). > > Any ideas? I've tried a few of the classes at www.phpclas

Re: [PHP] Compile PHP question

2004-04-15 Thread Red Wingate
Wrong one here: http://de2.php.net/manual/en/features.commandline.php [quote] The CLI SAPI was released for the first time with PHP 4.2.0, but was still experimental and had to be explicitly enabled with --enable-cli when running ./configure. Since PHP 4.3.0 the CLI SAPI is no longer experiment

Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Red Wingate
Back on-line :-) http://phpdoc.org/docs/HTMLSmartyConverter/default/phpDocumentor/ tutorial_tags.pkg.html [...] > well got it to work... there was problems with the way i was making their > comments... kept doing **/ at end of comment block instead of */ > > never did figure out what most of the

Re: [PHP] remote files handling

2004-04-13 Thread Red Wingate
http://de.php.net/filemtime [quote] As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer to Appendix J for a listing of which wrappers support stat() family of functionality. [/quote] -- red [...] > hello sir > need help in remote files handling. i.e, i want to > know

Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Red Wingate
Which version of PHP and phpDocumentor are you using ? -- red Am Mittwoch, 14. April 2004 06:25 schrieb Andy B: > so far it looks good... i got a test class/package to compile as far as the > docs go but now when i try to do more with it it always crashes: > c:> c:\php\cli\php -t c:\src\test\ -

Re: [PHP] storing an array in an ini file

2004-04-13 Thread Red Wingate
Hi, had the same problem before and got around this by writing my own tiny parser that should work just nicely ( as serializing is a pain-in-the-ass when editing the .ini file on foot ) Anyway i switched to using an XML-File now :-) define ('REGEXP_VARIABLE','[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\x

Re: [PHP] Getting the barcode

2004-04-13 Thread Red Wingate
it's preg_match_all Am Dienstag, 13. April 2004 15:05 schrieb Brent Clark: > Hi All > I have asked this question before, and the solution was partyly solved, I > hope hope someone can help me again. > > I have a binary file ( readbar ) that I execute with exec(). > and it give me an output as so:

Re: [PHP] intermittent problems using ftp_get ...Help!

2004-04-13 Thread Red Wingate
Maybe the max number of connections to the FTP server is reached? My provider allows only up to 3 FTP connections at the same time which causes similar problems to my scripts :-) -- red [...] > Can anyone tell me what would cause intermittent problems downloading files > using ftp_get. > I have

Re: [PHP] PHP time zone

2004-04-13 Thread Red Wingate
Best: use gmmktime() and add the required offset by: $time_here = gmmktime() + ( $offset * 60 * 60 ) ; > how can get a specific time zone, not the server time. > > example: > if the server time is 13:15:46 I need to output that time +5hours > so 18:15:46 > > because the hosting server time is

Re: [PHP] Using WinNT login

2004-04-08 Thread Red Wingate
Search the archive, we had this topic about a month ago and i pointed out a quite good solution on this topic. -- red > Hi All, > > Is it possible to use the users WinNT network login for a php app? > If so can someone point me in the direction for a tutorial or directions. > > > Thanks, > > >

Re: [PHP] page design and possible conflict??

2004-04-08 Thread Red Wingate
ok Am Donnerstag, 8. April 2004 14:45 schrieb Andy B: > dont know what his deal is but ok will close this idea now i guess.. > > - Original Message - > From: "Miles Thompson" <[EMAIL PROTECTED]> > To: "Andy B" <[EMAIL PROTECTED]> > Sent: Thursday, April 08, 2004 7:41 AM > Subject: Re: [PHP

Re: [PHP] Re: Administrator page and password problem

2004-04-07 Thread Red Wingate
Add this into the VERY last line : [...] 0) { $name = TRUE; } else { $name = FALSE; echo 'you have forgot to enter your name'; } // check for email adress if (strlen($_POST['email']) > 0) { $email = TRUE; } else { $email = FALSE; echo 'you have forgot to enter your email adress'; }

Re: [PHP] Re: Can someone with list access please remove these two?

2004-04-07 Thread Red Wingate
yep William Lovaton wrote: me too! -William El mi? 07-04-2004 a las 16:44, Justin Patrin escribió: Richard Davey wrote: Hi, Subject says it all - they're causing auto-responder junk to any list poster and it's annoying: Information Desk <[EMAIL PROTECTED]> Advance Credit Suisse Bank <[EMAIL

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
are considered empty() too. -William El mi? 07-04-2004 a las 16:34, Red Wingate escribió: JFYI : var_dump ( '' == 0 ) eq TRUE William Lovaton wrote: I don't think so, Wouldn't be better if ctype_digit() return false on an empty string?? any way an empty string is not

Re: [PHP] Administrator page and password problem

2004-04-07 Thread Red Wingate
You mixed up here a little :-) [...] > if (strlen($_POST['password1']) > 0) { > if ($_POST['password1'] == >($_POST['password2'] { > 1. $password = TRUE; > > } else { > $password = FALSE; > echo '' > } > } else { > $password = FALSE; >

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
refully the function that you propose is doing two things at once... at this level this is not a good idea. -William El mi? 07-04-2004 a las 12:39, Red Wingate escribió: No, as this would be yet another line of source. Maybe get those guys to add another function ctype_digit_and_not_empty(); -

Re: [PHP] Newbie question about operators

2004-04-07 Thread Red Wingate
arrays :-) you are defining arrays like: $x = array ( 'a' => 'Apple' , 'b' => 'Banana' , ... ); -- red Gabe wrote: Thanks for the page. That was helpful. Just to make sure, is that operator only typically used then with foreach loops and arrays? "Matt Matijevich" <[EMAIL PROTECTED]> wrote i

Re: [PHP] PHP OO concepts

2004-04-07 Thread Red Wingate
You will find some usefull ressources over at http://www.phppatterns.com/ -- red Robert Cummings wrote: [...] Hello, I have am checking out PHP OOP and it's pretty smooth. I have a decent amount of Java experience so PHP OOP is really easy to pick up. However I have a few questions I was hop

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
:-) -- red Dan Phiffer wrote: Red Wingate wrote: So, this one will work out quite well ( maybe one should take a look at the documentation of attributes() :-) Wow I can't believe I missed that. Hehe. I guess the lesson here is don't always trust what you get from print_r(). Than

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
ributes() AS $a => $b ){ echo $a .' --> '. $b .''; } $n++; } } -- red Dan Phiffer wrote: Red Wingate wrote: FALSE > $xml = simplexml_load_file( 'config.xml' ); foreach ( $xml->lib_error->p

Re: [PHP] PHP 5: SimpleXML attributes

2004-04-07 Thread Red Wingate
There is a way, but somehow i don't like it though ( but you can find this in the documentation ): This is config.xml: FALSE And my Testfile: $xml = simplexml_load_file( 'config.xml' ); foreach ( $xml->lib_error->param AS $id => $param ) { echo $param['name'] ; /

Re: [PHP] confused big time

2004-04-07 Thread Red Wingate
You could even do: $sql .= " ( '".implode( "','" , $a )."' )"; This way everything is quoted though ( but this doesn't matter using MySQL anyway ). If you want to escape the values of $a you could use array_map to do this also without having to loop :-) -- red [...] > To get your list of colu

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
No, as this would be yet another line of source. Maybe get those guys to add another function ctype_digit_and_not_empty(); -- red [...] > > * Thus wrote William Lovaton ([EMAIL PROTECTED]): > > > or modify is_numeric() to explictly perform an integer validation: > > > is_numeric(mixed value [,

Re: [PHP] Validating form field text input to be aspecificvariable type

2004-04-07 Thread Red Wingate
Why not add a function: display_my_cms(); This function will check the current cirumstances and displays an CMS system which fits 100% in every enviroment and layout. Even if new technics are available those will suddenly appear ( maybe CSS3 ). [...] > That's not bloat. And using a lot of li

Re: [PHP] Validating form field text input to be a specificvariable type

2004-04-07 Thread Red Wingate
An RegExp will work but is not as fast as native functions, but you could use something like: $len1 = strlen ( $input ); $len2 = strspn ( $input , "1234567890,." ); if ( $len1 == $len2 ) { echo 'yuuhooo'; } else { echo 'd\'oh'; } [...] > > From: "William Lovaton" <[EMAIL PROTECTED]> > > >

  1   2   >