[PHP] php extension problem

2004-11-30 Thread php
Hi folks, well, I hope you can help me out. I have a Windows XP machine running Apache 2.x and Php 5.x. So far, everything works fine. I have placed the php5ts.dll file in my System32 directory, kopied the php.ini file in the Windows root directory and loaded the apache module for php5. So far,

[PHP] Display only one filed of the repeated records

2004-11-30 Thread Ahmed Abdel-Aliem
Hi, i have a tables in database which fields is id - title - category what i want to do is to display the categories entered in the categories fields, without repeating any of them for eample if the records is like follow ID Title Cattegory 1Matrix

[PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Stuart Felenstein
I thought this one was under my control. Apparently not. I'm getting a Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/mypage.php on line 143 First, I have 3 form elements school[] school[] school[] Here is how I initialize the session variable (after user it's

[PHP] Parse a url for a specific string

2004-11-30 Thread web_singer
I would like to parse a url which is submitted to me for a link to check if it already has a link to my site on it. Does anyone know if php has a function which would allow me to do this relatively easily? Thanks in advance Jenn --- Outgoing mail is certified Virus Free. Checked by AVG

Re: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Marek Kilimajer
Stuart Felenstein wrote: I thought this one was under my control. Apparently not. I'm getting a Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/mypage.php on line 143 First, I have 3 form elements school[] school[] school[] Here is how I initialize the session

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

2004-11-30 Thread Marek Kilimajer
Ahmed Abdel-Aliem wrote: Hi, i have a tables in database which fields is id - title - category what i want to do is to display the categories entered in the categories fields, without repeating any of them for eample if the records is like follow ID Title Cattegory 1

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

2004-11-30 Thread Richard Davey
Hello Ahmed, Tuesday, November 30, 2004, 11:47:40 AM, you wrote: AAA i want to list the categories only like this AAA Sci-Fi - History - Horror This is a MySQL (or whatever DB you are using) question, but if it is MySQL look at the DISTINCT and GROUP BY select elements, i.e. SELECT

Re: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Stuart Felenstein
--- Marek Kilimajer [EMAIL PROTECTED] wrote: print_r($_SESSION['schools']); here Then finally on the transaction page, some pages down the road: and also print_r($_SESSION['schools']); here foreach($_SESSION['schools'] as $school) { What have you find out? They

[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: ID

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

2004-11-30 Thread Ed Curtis
On Tue, 30 Nov 2004, Ahmed Abdel-Aliem wrote: Hi, i have a tables in database which fields is id - title - category what i want to do is to display the categories entered in the categories fields, without repeating any of them for eample if the records is like follow ID Title

Re: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Richard Davey
Hello Stuart, Tuesday, November 30, 2004, 11:49:32 AM, you wrote: SF I can't for the life of me find the issue here. SF Any pointers / help would be greatly appreciated. Nothing wrong with the technique really, you can place an array into a session variable quite happily. Suggest you check the

Re: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread John Holmes
Stuart Felenstein wrote: --- Marek Kilimajer [EMAIL PROTECTED] wrote: print_r($_SESSION['schools']); here Then finally on the transaction page, some pages down the road: and also print_r($_SESSION['schools']); here foreach($_SESSION['schools'] as $school) What have you find out? They don't

Re: [PHP] Parse a url for a specific string

2004-11-30 Thread Richard Davey
Hello web_singer, Tuesday, November 30, 2004, 11:57:33 AM, you wrote: w I would like to parse a url which is submitted to me for a link to w check if it already has a link to my site on it. Does anyone know w if php has a function which would allow me to do this relatively w easily? You could

RE: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Graham Cossey
[snip] Then finally on the transaction page, some pages down the road: and also print_r($_SESSION['schools']); here foreach($_SESSION['schools'] as $school) { What have you find out? They don't exist. [snip] You have got session_start(); at the top of each

RE: [PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: You have got session_start(); at the top of each script haven't you? Absolutely, And the other variables are all working. Is the SID being passed down the chain of scripts? Is this done by cookie or url? cookie -or session. Stuart -- PHP

[PHP] RE: [SOLVED][PHP] Have I learned nothing . Foreach()

2004-11-30 Thread Stuart Felenstein
--- Graham Cossey [EMAIL PROTECTED] wrote: How embarassing. I had a typo elements were School variables were school Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Compiling a php program

2004-11-30 Thread Octavian Rasnita
Hi all, Does anyone know a free php compiler that can create a single .exe program with all the necessary libraries included in it? I don't want that .exe file to require other .dll files. I have tried a compiler named PriadoBlender or something like that, but it has a bad interface which is

[PHP] Messengers libraries?

2004-11-30 Thread Octavian Rasnita
Hi all, Does anyone know if there are free php libraries for creating MSN or Yahoo or Skype or AOL Messenger clients? Thanks. Teddy Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Compiling a php program

2004-11-30 Thread Mike
I've used EncPHP (http://sourceforge.net/projects/encphp/) a long while ago just to see how it'd work. It worked just fine - but the binaries get very large, very fast. (as one would expect). I also came across BinaryPHP (http://sourceforge.net/projects/binaryphp/) while searching for EncPHP (I

Re: [PHP] HTTP Authenticate via PHP

2004-11-30 Thread Raditha Dissanayake
Jeffery Fernandez wrote: Hi, I am trying to find out if its possible to authenticate a page against an HTTP authentication. Basically what I am trying to do is make available the stats page of the Cpanel to the admin interface of a site. When accessing the stats via the cpanel the user needs to

Re: [PHP] Messengers libraries?

2004-11-30 Thread Raditha Dissanayake
Octavian Rasnita wrote: Hi all, Does anyone know if there are free php libraries for creating MSN or Yahoo or Skype or AOL Messenger clients? You might want to look at the php interface to jabber available at jabberstudio Thanks. Teddy Teddy -- Raditha Dissanayake.

[PHP] load word document with php

2004-11-30 Thread Thomas Franz
Hello, i hope this is the right newsgroup. I start working with php. Now, i want loading worddocuments into the with php, change/add some text and save this changes. I found following simple example. ?php $word=new COM(word.application) or die(Cannot start word for you); $word-visible = 1

Re: [PHP] HTTP Authenticate via PHP

2004-11-30 Thread Jason Wong
On Tuesday 30 November 2004 14:13, Jeffery Fernandez wrote: Is it possible for me to store the username password credentials within the php page and pass that across via headers to authenticate the page for viewing the stats. The main purpose is to make the webstats transparent to the admin

Re: [PHP] load word document with php

2004-11-30 Thread Jason Wong
On Tuesday 30 November 2004 21:35, Thomas Franz wrote: i hope this is the right newsgroup. I start working with php. Now, i want loading worddocuments into the with php, change/add some text and save this changes. I found following simple example. ?php $word=new COM(word.application)

Re: [PHP] load word document with php

2004-11-30 Thread Richard Davey
Hello Thomas, Tuesday, November 30, 2004, 1:35:10 PM, you wrote: TF ?php TF$word=new COM(word.application) or die(Cannot start word for you); TF$word-visible = 1 ; TF$word-Documents-Open(Test.doc); TF$word-Selection-TypeText(Hello World); TF$word-Documents[1]-SaveAs(New

[PHP] Re: HTTP Authenticate via PHP

2004-11-30 Thread Manuel Lemos
Hello, On 11/30/2004 04:13 AM, Jeffery Fernandez wrote: I am trying to find out if its possible to authenticate a page against an HTTP authentication. Basically what I am trying to do is make available the stats page of the Cpanel to the admin interface of a site. When accessing the stats via

[PHP] php editor or php IDE for linux with autocompletion

2004-11-30 Thread [EMAIL PROTECTED]
Hi. We use linux as default development system. Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). We like quanta and kate, but there is no autocompletion. Does anyone know about a php IDE? I got a look at the

[PHP] Re: cannot send mail through localhost

2004-11-30 Thread Manuel Lemos
Hello, On 11/30/2004 12:42 AM, Ross Hulford wrote: I am trying to test my form locally, however it doesn't get picked up my mailbox. The form is fine and I even set the access in IIS to 127.0.0.1 so the relay error is not a porblem anymore. This must be a setup problem. The mail is a standard

[PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread M. Sokolewicz
[EMAIL PROTECTED] wrote: Hi. We use linux as default development system. Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). We like quanta and kate, but there is no autocompletion. Does anyone know about a php

Re: [PHP] php editor or php IDE for linux with autocompletion

2004-11-30 Thread Jason Wong
On Tuesday 30 November 2004 23:18, [EMAIL PROTECTED] wrote: Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). We like quanta and kate, but there is no autocompletion. What version of quanta are you using?

Re: [PHP] php editor or php IDE for linux with autocompletion

2004-11-30 Thread Steve Brown
Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). I use the PHPEclipse add on for the Eclipse IDE. Eclipse provides a fantastic suite of tools for coding in almost any language. The PHPEclipse add-ons

RE: [PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread Dustin Wish with INDCO Networks
Speaking of IDE's, does anyone know if Codeweavers has ported Dreamweaver to Linux? It is my favorite IDE for programming web apps. -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 30, 2004 9:38 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: php

[PHP] print_r() and SimpleXML

2004-11-30 Thread Paul Reinheimer
Hi All, All of my research seems to indicate that print_r() and SimpleXML are amongst the two most usefull things to have when working with XML documents. However, when using print_r on a SimpleXML object that has attributes, the attributes are not shown. I would propose that this is not the

[PHP] Re: print_r() and SimpleXML

2004-11-30 Thread Paul Reinheimer
How silly of me, my apologies. PHP 5.0.2 './configure' '--with-mysql=/usr/local/mysql' '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png' '--with-zlib-dir=/root/zlib-1.2.1' '--enable-gd-native-ttf' '--with-ttf' '--with-jpeg-dir=/usr/local/lib/jpeg-6b/'

Re: [PHP] PHP arrays and javascript

2004-11-30 Thread Nick Peters
Hodicska Gergely wrote: trigger_error('Hoppa, egy új típus a PHP-ben? '.__CLASS__.'::'.__FUNCTION__.'()!', E_USER_WARNING); on that line, what is the error you are trying to catch? I can't read what ever language that is ;-) thanks. -Nick Peters -- PHP General

Re: [PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread Christophe Chisogne
M. Sokolewicz wrote: I prefer vim, which does have auto-completion, as an add-on. Interesting. Where can this add-on be found? (google/vim.org/debian.org, I guess, but...) wouldn't call it an IDE... =/ Yes, but so usefull when edition html tags Ex ct to change to end of current tag Ex c/table to

[PHP] Question: Search from , text fields

2004-11-30 Thread Stuart Felenstein
I'm building a search form where users can search for people by zip code. Trying to get an opinion here. Well maybe more then just one. Should I have seperate textfields, say (arbitrary) 3 , where they can put in 1 zip code per field. Or do I do it with one text field , using delimited

Re: [PHP] PHP arrays and javascript

2004-11-30 Thread Nick Peters
Hodicska Gergely wrote: Hi! Would this work the same for multidimensional arrays? Encoding was a special feature needed by me, maybe you don't need it. Usage: myArray = array(...); echo 'script'.arrayToJsArray($myArray, 'myArray').'/script'; Felho --- 8 --- arrayToJsArray.php ---

Re: [PHP] Compiling a php program

2004-11-30 Thread Octavian Rasnita
Thanks. I found encPHP very easy to use. Now, I have another question. I would like to be able to encrypt the PHP code for distributing to others. Is there a method of encrypting the code before creating a binary executable from it? I have seen that EncPHP just unpacks its content into a temp

Re: [PHP] Question: Search from , text fields

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 09:22:11 -0800 (PST), Stuart Felenstein [EMAIL PROTECTED] wrote: I'm building a search form where users can search for people by zip code. Trying to get an opinion here. Well maybe more then just one. Should I have seperate textfields, say (arbitrary) 3 , where they can

Re: [PHP] Compiling a php program

2004-11-30 Thread John Nichel
Octavian Rasnita wrote: Thanks. I found encPHP very easy to use. Now, I have another question. I would like to be able to encrypt the PHP code for distributing to others. Is there a method of encrypting the code before creating a binary executable from it? Search the archives. This has been

[PHP] Return value in Combo Box

2004-11-30 Thread Ahmed Abdel-Aliem
Hi, i have a form which user have to fill all the fields in it, when the form is submitted it goes to a validation page which checks if users entered all the required fields. what i want to do is to make the validation page redirect to the form again with the previuosly entered values, so the

Re: [PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread M. Sokolewicz
Christophe Chisogne wrote: M. Sokolewicz wrote: I prefer vim, which does have auto-completion, as an add-on. Interesting. Where can this add-on be found? (google/vim.org/debian.org, I guess, but...) wouldn't call it an IDE... =/ Yes, but so usefull when edition html tags Ex ct to change to end

Re: [PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread Matthew Weier O'Phinney
* M. Sokolewicz [EMAIL PROTECTED]: Christophe Chisogne wrote: M. Sokolewicz wrote: I prefer vim, which does have auto-completion, as an add-on. Interesting. Where can this add-on be found? (google/vim.org/debian.org, I guess, but...) wouldn't call it an IDE... =/

[PHP] imagesx(): supplied argument is not a valid Image resource

2004-11-30 Thread Robert Sossomon
I am running on Windows 200, PHP 4.3.9 I have my extensions directory set. SNIP FROM PHP.INI ;Windows Extensions ;Note that MySQL and ODBC support is now built in, so no dll is needed for it. ; extension=php_gd2.dll extension=php_mime_magic.dll extension=php_pdf.dll extension=php_zip.dll /SNIP But

Re: [PHP] Return value in Combo Box

2004-11-30 Thread David Dickson
Ahmed Abdel-Aliem wrote: Hi, i have a form which user have to fill all the fields in it, when the form is submitted it goes to a validation page which checks if users entered all the required fields. what i want to do is to make the validation page redirect to the form again with the previuosly

[PHP] Re: Return value in Combo Box

2004-11-30 Thread Ben Ramsey
Ahmed Abdel-Aliem wrote: can anyone please tell me how to make the choice the user selected in the combo box be selected when the validation page redirects to the form again ? One way is to do it like this: select name=foo option value=1?php if ($_POST['foo'] == '1') { echo '

Re: [PHP] imagesx(): supplied argument is not a valid Image resource

2004-11-30 Thread John Nichel
Robert Sossomon wrote: snip But I get this error: imagesx(): supplied argument is not a valid Image resource when I try to get the information from a file. anyone have a clue? Yeah, the problem is in your code...which we haven't seen. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL

[PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
Here's the code for the page... ?php // this is the path of your files folder. Change 'pathofile' $dir = images/; // this takes the files in the directory and puts them in an array $array = array(); $handle = opendir($dir); $extensoes = array(jpg, png, jpeg, gif); while ($file = readdir($handle))

[PHP] Problem with parameter count in strstr()

2004-11-30 Thread Shaun
Hi, I am trying to ensure that all data added to each element of $my_data_array has no commas, however I get an error message saying Warning: Wrong parameter count for strstr() $my_data_array[] = strstr( $data[1], ,, ); strstr( $data[2], ,, ).', '. strstr(

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread John Nichel
Robert Sossomon wrote: snip // this is the path of your files folder. Change 'pathofile' $dir = images/; I would make this the path from root, ie... $dir = /root/path/images/; snip // takes the objects in the array and randomizes them $arrayobj = array_rand($array); $random = $array[$arrayobj];

[PHP] Re: Problem with parameter count in strstr()

2004-11-30 Thread Matthew Weier O'Phinney
* Shaun [EMAIL PROTECTED]: I am trying to ensure that all data added to each element of $my_data_array has no commas, however I get an error message saying Warning: Wrong parameter count for strstr() $my_data_array[] = strstr( $data[1], ,, ); strstr( $data[2], ,,

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
John Nichel is quoted as saying on 11/30/2004 2:17 PM: snip $width = imagesx($path)/4; $height = imagesy($path)/4; $width = imagesx($path)/4; $height = imagesy($path)/4; When I run it in the browser, I get: Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php on line 31

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 14:43:51 -0500, Robert Sossomon [EMAIL PROTECTED] wrote: Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php on line 31 Do print_r( gd_info() ); to see if your PHP has support for working with images. -- Greg Donald Zend Certified Engineer

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Chris
imagesx() requires an image resource , not a file path. so you'd need to use one of the imagecreatefrom* functions to create the resource. But it looks like all you want is the width and height of an image If so use get imagesize() ( which *does* except a pathname, not a resource) Chris

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread John Nichel
Robert Sossomon wrote: snip When I run it in the browser, I get: Fatal error: Call to undefined function: imagesx() in c:\fourh\spotlight3.php on line 31 when i run it from the command line I get: C:\fourhphp.exe spotlight3.php Content-type: text/html X-Powered-By: PHP/4.3.9 br / bWarning/b:

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-11-30 Thread Robert Sossomon
Chris is quoted as saying on 11/30/2004 2:53 PM: imagesx() requires an image resource , not a file path. so you'd need to use one of the imagecreatefrom* functions to create the resource. But it looks like all you want is the width and height of an image If so use get imagesize() ( which

[PHP] echo

2004-11-30 Thread Christopher Weaver
I can't get this code, pasted from the documentation, to work properly. The new lines don't occur where they should. ?php echo Hello World; echo This spans multiple lines. The newlines will be output as well; echo This spans\nmultiple lines. The newlines will be\noutput as well.; echo END

[PHP] Re: Problem with parameter count in strstr()

2004-11-30 Thread Shaun
Sorry, I was confusing strstr with strtr! Matthew Weier O'Phinney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Shaun [EMAIL PROTECTED]: I am trying to ensure that all data added to each element of $my_data_array has no commas, however I get an error message saying Warning:

RE: [PHP] echo

2004-11-30 Thread Chris W. Parker
Christopher Weaver mailto:[EMAIL PROTECTED] on Monday, November 29, 2004 6:20 PM said: I can't get this code, pasted from the documentation, to work properly. The new lines don't occur where they should. You are probably expecting the wrong thing. The newlines only appear in the source of

Re: [PHP] echo

2004-11-30 Thread David Dickson
Christopher Weaver wrote: I can't get this code, pasted from the documentation, to work properly. The new lines don't occur where they should. This is because the output is being interpreted by a web browser which expects HTML. You need to put in br / every where you want a new line. -- David

RE: [PHP] echo

2004-11-30 Thread Mike
How are you running the file? If it's in a web browser, you won't see the new lines since you'd need br or p tabs instead of \n's. So when you say that it's not working properly, can you at least say how it *is* working and how that's different from what you expect? -M -Original

Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread John Nichel
AndyO wrote: I'm working on a project where an engineer/user has to be able to log in to a device locally and change the IP address. The OS is Linux. We want to make the interface simple and so we thought of using a webpage that allows the engineer/user to change the address without having to

Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread AndyO
John Nichel wrote: AndyO wrote: I'm working on a project where an engineer/user has to be able to log in to a device locally and change the IP address. The OS is Linux. We want to make the interface simple and so we thought of using a webpage that allows the engineer/user to change the address

Re: [PHP] My session.c doesnt work!

2004-11-30 Thread Greg Donald
On Mon, 29 Nov 2004 21:38:05 -, Colin [EMAIL PROTECTED] wrote: I dont know if this is the correct group, but anyway. As part of a school project I decided to develop a solution to security in php sessions. The database abstraction layer ADOdb offers compression and encryption support for

[PHP] Using PHP to change Linux IP address

2004-11-30 Thread AndyO
I'm working on a project where an engineer/user has to be able to log in to a device locally and change the IP address. The OS is Linux. We want to make the interface simple and so we thought of using a webpage that allows the engineer/user to change the address without having to use the Linux

Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 16:50:27 -0500, John Nichel [EMAIL PROTECTED] wrote: PHP (the webserver) would have to have permission to edit the ifcfg-eth0 (eth1, eth2, etc) file, and have permission to restart the network. sudo would probably help with the permissions requirements. -- Greg Donald

[PHP] My session.c doesnt work!

2004-11-30 Thread Colin
Hi, I dont know if this is the correct group, but anyway. As part of a school project I decided to develop a solution to security in php sessions. i've started playing with session.c (below) but whenever i call a script with session_start() on it it doesnt load, but a session file is created on

[PHP] Anybody using Roadsend Compiler?

2004-11-30 Thread Adrian Madrid
I'm thinking about evaluating the Roadsend Compiler and wanted to know how people that are using it feel about it. Thanks, -- Adrian Madrid HyperX Inc. Mobile: 801.815.1870 Office: 801.566.0670 [EMAIL PROTECTED] www.hyperxmedia.com 9000 S. 45 W. Sandy, UT 84070 -- PHP General Mailing List

[PHP] Header's download

2004-11-30 Thread Christian Johansson
Hello. I use: Header(Content-Type: application/download); Header(Content-Disposition: attachment; filename=export.txt); Then after this is done I know that I can write stuff to the file like this: Echo This will be a line in my file\n; I am standing in a GUI containing

[PHP] Re: echo

2004-11-30 Thread Christopher Weaver
OK, I get it now. I had forgotten that PHP output is text, as opposed to the result produced by HTML. When the documentation states that the newlines will be output as well it means that literally -- not that the browser will output the newlines. Thanks for jumping onto this. Chris. --

[PHP] echo string with question mark in it

2004-11-30 Thread Brent Clements
I have the following string variable $string = 'test.php?id=' . $id; but when I echo out the string it looks like this test.php? id=# ### is the $id variable value btw. How do I make the ? part of the string instead of php evaluating that question mark? I've tried adding \

Re: [PHP] Using PHP to change Linux IP address

2004-11-30 Thread John Nichel
Greg Donald wrote: On Tue, 30 Nov 2004 16:50:27 -0500, John Nichel [EMAIL PROTECTED] wrote: PHP (the webserver) would have to have permission to edit the ifcfg-eth0 (eth1, eth2, etc) file, and have permission to restart the network. sudo would probably help with the permissions requirements.

RE: [PHP] echo string with question mark in it

2004-11-30 Thread Chris W. Parker
Brent Clements mailto:[EMAIL PROTECTED] on Tuesday, November 30, 2004 3:55 PM said: I have the following string variable $string = 'test.php?id=' . $id; but when I echo out the string it looks like this test.php? id=# How do I make the ? part of the string instead of php

[PHP] Spawning new pages

2004-11-30 Thread Christopher Weaver
I want one of my functions to create and open a new page. I know how to call an existing page from PHP ala form action, but in this case I want to dynamically create and then display several pages. I'm thinking that perhaps I should assemble some HTML, write it out to a files, then open the HTML

[PHP] regex issue

2004-11-30 Thread nate
All I want to do is capture the keyword (array, break, echo, etc) and color it. --- $txt = this is an array('test'); $pattern = /(array|break|echo|continue)([\(.|\s.|\;.])/; echo preg_replace($pattern, 'font color=red$0/font', $txt); This captures

Re: [PHP] Spawning new pages

2004-11-30 Thread Brent Clements
This is simple. echo html; echo body; echo Hello World; echo /body; echo /html; There are many ways to do what you want to do. It's at the core of PHP. -Brent - Original Message - From: Christopher Weaver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 30, 2004 6:54 PM

RE: [PHP] Spawning new pages

2004-11-30 Thread Chris W. Parker
Christopher Weaver mailto:[EMAIL PROTECTED] on Tuesday, November 30, 2004 4:55 PM said: I want one of my functions to create and open a new page. I know how to call an existing page from PHP ala form action, but in this case I want to dynamically create and then display several pages.

Re: [PHP] Spawning new pages

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 17:20:48 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: PHP does not actually do anything on the client side *EXCEPT* to create all the HTML that gets sent to the client. From the department-of-redundancy-department no less. :) PHP does not do _anything_ client side.

Re: [PHP] regex issue

2004-11-30 Thread Greg Donald
On Tue, 30 Nov 2004 17:18:33 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: All I want to do is capture the keyword (array, break, echo, etc) and color it. I'd do it like this: $source = 'this is a line of text'; $term = 'line'; $text = eregi_replace(($term), font color=red\\1/font,

RE: [PHP] Spawning new pages

2004-11-30 Thread Chris W. Parker
Greg Donald mailto:[EMAIL PROTECTED] on Tuesday, November 30, 2004 5:28 PM said: On Tue, 30 Nov 2004 17:20:48 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: PHP does not actually do anything on the client side *EXCEPT* to create all the HTML that gets sent to the client. From the

Re: [PHP] Date Manipulation

2004-11-30 Thread John Holmes
Christopher Weaver wrote: I've looked at the date functions in the manual but can't find what I need. All I want to do is add and subtract days without ending up with bogus date values. IOW, Nov. 29 + 7 days shouldn't be Nov. 36. Just a nod in the write direction would be great. mktime() or

[PHP] Date Manipulation

2004-11-30 Thread Christopher Weaver
I've looked at the date functions in the manual but can't find what I need. All I want to do is add and subtract days without ending up with bogus date values. IOW, Nov. 29 + 7 days shouldn't be Nov. 36. Just a nod in the write direction would be great. Thanks. -- PHP General Mailing List

RE: [PHP] regex issue

2004-11-30 Thread nate
I don't want to match something like linear though. I only want to match line or line( or line; and only replace the line portion of it. Thanks, Nate -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 30, 2004 5:36 PM To: [EMAIL PROTECTED] Subject:

[PHP] Very fresh to php

2004-11-30 Thread suneel
Hi...guys, I'm a new bee to php. Could any one tell me that who is the father of php? take care guys,

Re: [PHP] Very fresh to php

2004-11-30 Thread Ryan King
On Nov 30, 2004, at 10:45 PM, suneel wrote: Hi...guys, I'm a new bee to php. Could any one tell me that who is the father of php? take care guys, That would be Rasmus Lerdorf - http://php.net/history -ryan - http://theryanking.com/blog -- PHP General Mailing List

Re: [PHP] Very fresh to php

2004-11-30 Thread Santa
01 2004 07:45 suneel (a): Hi...guys, I'm a new bee to php. Could any one tell me that who is the father of php? take care guys, and who is mother? 8)

Re: [PHP] Spawning new pages

2004-11-30 Thread Christopher Weaver
Here's what I've got In first php file include second.php; createPage(withThis); createPage(withThat); In second php file function createPage { echo HTML; echo BODY; echo more stuff here; echo /HTML; echo /BODY; } Here's the problem. I get only one page, not two. I want a new page

Re: [PHP] regex issue

2004-11-30 Thread Rick Fletcher
[EMAIL PROTECTED] wrote: All I want to do is capture the keyword (array, break, echo, etc) and color it. $txt = this is an array('test'); $pattern = /(array|break|echo|continue)([\(.|\s.|\;.])/; echo preg_replace($pattern, 'font color=red$0/font', $txt); This captures array( though and I just

Re: [PHP] print_r() and SimpleXML

2004-11-30 Thread Rick Fletcher
[snip] when using print_r on a SimpleXML object that has attributes, the attributes are not shown. I would propose that this is not the desired response. When using print_r on an object, it should display all available information (even, as the manual indicates, private and/or protected

Re: [PHP] Spawning new pages

2004-11-30 Thread Jason Wong
On Wednesday 01 December 2004 15:02, Christopher Weaver wrote: Here's what I've got In first php file include second.php; createPage(withThis); createPage(withThat); ... Of all the correct answers that you received you had to pick and use the wrong answer! PHP can't spawn new pages.