Re: [PHP] why doesn't this work ?

2004-04-17 Thread Andy Ladouceur
It's already been mentioned, but you do need to ensure you are using a .php extension on the file. Also, forgive me if this has already been covered, but are you sure the server even supports PHP? Try creating a new file with: And save it as something.php, check and see if it returns a table fu

Re: [PHP] Why are Session Variables carried over into a brand new browser window?

2004-04-17 Thread Greg Donald
> so this opens a new browser window, but it is inheriting the session values > from the browser window that called it and is causing problems in the new > window. When I open a new browser window shouldn't it start a whole new > session and not get anything from the previous browser. A buddy of

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Pooya Eslami
I put this in the body of an html file: $file"; } } closedir($handle); } echo ""; ?> the output page contains : $file "; } } closedir($handle); } echo " "; ?> I don't understand why. "Daniel Clark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can you post the cod

Re: [PHP] Array Problem

2004-04-17 Thread Tom Rogers
Hi, Saturday, April 17, 2004, 7:00:49 AM, you wrote: FF> Hi FF> I have i Problem i got a variable a=2351 now i need to create an array out of this variable FF> a[0]=1 FF> a[1]=3 FF> a[2]=5 FF> a[3]=1 FF> I have an idea to use the modulo function an do some Math but FF> im sure there is a nicer

Re: [PHP] Why are Session Variables carried over into a brand new browser window?

2004-04-17 Thread Travis Low
Sorry, the new window is part of the same session. You'll have to find some other way to distinguish between the two windows. cheers, Travis Bob Bruce - Programmer wrote: This is my first posting to this group, so I am not familiar with any special etiquette for it, please bear with me. . . I

[PHP] Why are Session Variables carried over into a brand new browser window?

2004-04-17 Thread Bob Bruce - Programmer
This is my first posting to this group, so I am not familiar with any special etiquette for it, please bear with me. . . I maintain the PHP code for the website for the murals of Winnipeg and have found a situation where I have a session open with the state of the user's search results saved in th

Re: [PHP] Removing line breaks...

2004-04-17 Thread Daniel Clark
str_replace( $line, '\n', '') http://us2.php.net/manual/en/function.str-replace.php >>How do i turn this... >> >>[br] >> [b]My Title [/b] >>[br] >> >>into >> >>[br][b]My Title[/b][br] >> >> >>--- I just need to have line breaks removed basically... >> >>any ideas? -- PHP General Mailing List (

Re: [PHP] Removing line breaks...

2004-04-17 Thread -{ Rene Brehmer }-
str_replace("\n",'',$string); don't think it'd be any faster with the regex ones... Rene At 01:18 18-04-2004, Russell P Jones wrote: How do i turn this... [br] [b]My Title [/b] [br] into [br][b]My Title[/b][br] --- I just need to have line breaks removed basically... any ideas? Russ Jones

[PHP] Bookmark server

2004-04-17 Thread Chris W
I am planning on writing a "bookmark server" in php. The idea is I will have a database that stores all my internet favorites on a web server some where, so if I am doing some web browsing away from home and find a site I want to save, I can go to my bookmark server and save the url there. No

[PHP] Removing line breaks...

2004-04-17 Thread Russell P Jones
How do i turn this... [br] [b]My Title [/b] [br] into [br][b]My Title[/b][br] --- I just need to have line breaks removed basically... any ideas? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Daniel Clark
Can you post the code and error. >>I took out the scrip tags and put in at the >>end, but it returns this: >> >>$file >>"; } } closedir($handle); } echo " >>"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general Digest 17 Apr 2004 23:21:37 -0000 Issue 2711

2004-04-17 Thread php-general-digest-help
php-general Digest 17 Apr 2004 23:21:37 - Issue 2711 Topics (messages 183712 through 183745): Re: php and mysql help 183712 by: David Robley Re: http header 183713 by: Daniel Clark 183714 by: Torsten Roehr Print out all the files in a directory 183715 by: Po

Re: [PHP] Rporting tool - CVS?

2004-04-17 Thread Daniel Clark
Beyond Compare is a pretty cool diff program. www.scootersoftware.com They have a demo version. >>Scenario : >>Im working on several large projects, all which have several users. >>Each user has a personal innstallation. >> >>Each of my projects are in constant development, and often the

[PHP] Re: Print out all the files in a directory

2004-04-17 Thread Rainer Müller
Pooya Eslami schrieb: Hi, I want to write a simple script that looks for all the files with a common name and show them, like all the .mp3 files or all the .doc files. How do I go about it? Thank you, -Pooya Look in the manual at php.net, especially: http://php.net/opendir http://php.net/readdir ht

[PHP] Form data not available at first. Why?

2004-04-17 Thread Dave Pidgeon
Since the server upgrade to PHP 4.3.4 I have a odd problem with FORM data capture. When Page one and two are started in the open http:// ,the pair work just fine. If they are started with ssl https:// then page two has no data until you refresh and ok the resending of the data, At which point

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Pooya Eslami wrote: I took out the scrip tags and put in at the end, but it returns this: $file "; } } closedir($handle); } echo " "; ?> Any ideas how to fix this? Use a .php extension on your file. Or you can ask your hosting company to have .html files processed as PHP, but they won't. -- --

Re: [PHP] Rporting tool - CVS?

2004-04-17 Thread Jordi Canals
Kim Steinhaug wrote: Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who c

RE: [PHP] Rporting tool - CVS?

2004-04-17 Thread Aaron Wolski
Beyond Compare: http://www.scootersoftware.com/home.php Enjoy :) Aaron > -Original Message- > From: Kim Steinhaug [mailto:[EMAIL PROTECTED] > Sent: April 17, 2004 2:48 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Rporting tool - CVS? > > Scenario : > Im working on several large proje

[PHP] Re: php accelerator for php5rc1 ?

2004-04-17 Thread Thomas Seifert
On Sat, 17 Apr 2004 19:01:21 +0100 [EMAIL PROTECTED] (David Herring) wrote: > > The latest Zend optimiser - 3.60 does not support php 5 - is there any > alternative accelerators which do ? uhm, afaik the "optimiser" is not an accelerator, more kind of a loader for encrypted files. You would hav

Re: [PHP] [AWF-TOPIC] Reporting tool - CVS?

2004-04-17 Thread Robert Cummings
On Sat, 2004-04-17 at 14:47, Kim Steinhaug wrote: > Scenario : > Im working on several large projects, all which have several users. > Each user has a personal innstallation. > > Each of my projects are in constant development, and often the updates > from version to version are only in a

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Pooya Eslami
I took out the scrip tags and put in at the end, but it returns this: $file "; } } closedir($handle); } echo " "; ?> Any ideas how to fix this? "John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Daniel Clark wrote: > > > I should have also said: > > > > Because it'

[PHP] Rporting tool - CVS?

2004-04-17 Thread Kim Steinhaug
Scenario : Im working on several large projects, all which have several users. Each user has a personal innstallation. Each of my projects are in constant development, and often the updates from version to version are only in a few files. Is there a tool out there who can compare two fold

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Daniel Clark wrote: I should have also said: Because it's missing the tags, the > web server isn't going to run the code, but pass > it back to the client browser. You are right, but not for the reason you think.

Re: [PHP] Array Problem

2004-04-17 Thread Richard Harb
Saturday, April 17, 2004, 7:38:46 PM, Arthur Radulescu wrote: >> That's how you could do it ... >> >> $ar = array(); >> >> $len = strlen($a); >> for ($i = 0; $i < $len; ++$i) { >> $ar[] = $a{$i}; >> } > If I remember well strlen is used for checking the length of a string... It does ... I

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Pooya Eslami
I took out the scrip tags and put in at the end, but it returns this: $file "; } } closedir($handle); } echo " "; ?> Any ideas how to fix this? "Daniel Clark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I should have also said: > > Because it's missing the tags, the web ser

Re: [PHP] Array Problem

2004-04-17 Thread Daniel Clark
How about count() >>That's how you could do it ... >> >>$ar = array(); >> >>$len = strlen($a); >>for ($i = 0; $i < $len; ++$i) { >>$ar[] = $a{$i}; >>} >> >>HTH >> >>Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Daniel Clark
I should have also said: Because it's missing the tags, the web server isn't going to run the code, but pass it back to the client browser. >>If I put the following script in a .php file it would work but if I put it >>in an .html file doesn't work, why? script tag is only used in .html file.

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Daniel Clark
The browser doesn't know what to do with PHP code. >>If I put the following script in a .php file it would work but if I put it >>in an .html file doesn't work, why? script tag is only used in .html file. >> >> >>echo "
    "; >>if ($handle = opendir('.')) { >> while (false !== ($file = readdir(

[PHP] php accelerator for php5rc1 ?

2004-04-17 Thread David Herring
The latest Zend optimiser - 3.60 does not support php 5 - is there any alternative accelerators which do ? thx dave -- David Herring --- Netfm Ltd T: 07092 140694 M: 07766 086179 F: 07092 337656 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

RE: [PHP] Formatting phone numbers?

2004-04-17 Thread Andy Crain
Jay, > Here is a little more of the larger function with comments (more > comments than code, which is never a Bad Thing [tm]). I am only showing > the handling for two basic types of telephone numbers with explanation > for additional verification which we would typically use, since we have > tho

Re: [PHP] Array Problem

2004-04-17 Thread Arthur Radulescu
> That's how you could do it ... > > $ar = array(); > > $len = strlen($a); > for ($i = 0; $i < $len; ++$i) { > $ar[] = $a{$i}; > } If I remember well strlen is used for checking the length of a string... Arthur Looking for a job!? Use

Re: [PHP] Array Problem

2004-04-17 Thread Richard Harb
That's how you could do it ... $ar = array(); $len = strlen($a); for ($i = 0; $i < $len; ++$i) { $ar[] = $a{$i}; } HTH Richard Friday, April 16, 2004, 11:00:49 PM, you wrote: > Hi > I have i Problem i got a variable a=2351 now i need to create an array out of this > variable > a[0]=1

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Pooya Eslami
How do I do that? I don't have a webserver, it is hosted by a hosting company. "John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Pooya Eslami wrote: > > If I put the following script in a .php file it would work but if I put it > > in an .html file doesn't work, why?

Re: [PHP] why doesn't this work ?

2004-04-17 Thread John W. Holmes
Pooya Eslami wrote: If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. You web server determines whether or not to look for PHP in a file based upon its extension. You must set up your web server to

[PHP] Array Problem

2004-04-17 Thread Flavio Fontana
Hi I have i Problem i got a variable a=2351 now i need to create an array out of this variable a[0]=1 a[1]=3 a[2]=5 a[3]=1 I have an idea to use the modulo function an do some Math but im sure there is a nicer way of solving my prob thx Flavio -- PHP General Mailing List (http://www.php.net

[PHP] why doesn't this work ?

2004-04-17 Thread Pooya Eslami
If I put the following script in a .php file it would work but if I put it in an .html file doesn't work, why? script tag is only used in .html file. echo "
    "; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != ".." && eregi('\.h

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Pooya Eslami
Thank you Robert. "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 2004-04-17 at 12:35, Pooya Eslami wrote: > > That is exactly my question! how do I look for a .mp3 file?! > > I tried > > if ($file != "." && $file != ".." && $file=="*.mp3") > > but it does

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Robert Cummings
On Sat, 2004-04-17 at 12:35, Pooya Eslami wrote: > That is exactly my question! how do I look for a .mp3 file?! > I tried > if ($file != "." && $file != ".." && $file=="*.mp3") > but it doesn't work! if( eregi( '\.mp3$', $file ) ) Cheers, Rob. -- .--

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Pooya Eslami
That is exactly my question! how do I look for a .mp3 file?! I tried if ($file != "." && $file != ".." && $file=="*.mp3") but it doesn't work! "Matt Matijevich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > on that page ther is examples > > if ($handle = opendir('.')) { >whi

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
on that page ther is examples -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Pooya Eslami
But how do I get all the .mp3 files? can I use *.mp3? and how ? "Matt Matijevich" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Print out all the files in a directory

2004-04-17 Thread Pooya Eslami
Hi, I want to write a simple script that looks for all the files with a common name and show them, like all the .mp3 files or all the .doc files. How do I go about it? Thank you, -Pooya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: http header

2004-04-17 Thread Torsten Roehr
"Gabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is the following code the best way to redirect someone to a different > page using PHP? > > header("Location: http://www.yahoo.com";); > ?> >From personal experience I can recommend putting "exit;" behind a header() redirect to

Re: [PHP] http header

2004-04-17 Thread Daniel Clark
Yes, that works. >>Is the following code the best way to redirect someone to a different >>page using PHP? >> >>>header("Location: http://www.yahoo.com";); >>?> >> >>I looked for a "redirect" function of some kind and didn't come up with >>anything. Just curious what the consensus is...

RE: [PHP] php and mysql help

2004-04-17 Thread David Robley
[EMAIL PROTECTED] (Jay Blanchard) wrote in news:[EMAIL PROTECTED]: > Why are you sending this to me? You're at Stanford, you can probably > figure out the unsubscribe link and stuff > > -Original Message- > From: David A. Stevens [mailto:[EMAIL PROTECTED] > Sent: Friday, April 16, 2004

php-general Digest 17 Apr 2004 08:05:37 -0000 Issue 2710

2004-04-17 Thread php-general-digest-help
php-general Digest 17 Apr 2004 08:05:37 - Issue 2710 Topics (messages 183673 through 183711): Re: Unwanted e-mails 183673 by: Elfyn McBratney 183674 by: Travis Low 183675 by: Lester Caine 183676 by: John W. Holmes 183677 by: John Nichel 183679

[PHP] Re: Fatal error: Call to undefined function: mysql_connect()

2004-04-17 Thread David Robley
[EMAIL PROTECTED] (Tim) wrote in news:[EMAIL PROTECTED]: > Setup: > 2 servers, one with PHP 4.1.2 and no MySQL installed, the other has > MySQL and PHP 4.1.2 > > Problem: > I am attempting to connect to the MySQL server from the server without > MySQL, but I get the error that shows in the subje