[PHP] Re: Code and Good Design Methods

2003-07-13 Thread rush
"Dan J. Rychlik" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am reading PHP and MySQL web development 2nd edition book. Chapter 6 talks about displaying >dynamic web content using class objects. For the type of project that I am building, this is not optimal. >How do I keep my

Re: [PHP] Strange Problem

2003-07-13 Thread Curt Zirzow
Haseeb <[EMAIL PROTECTED]> wrote: > > > Hi all, > this is a very strange problem. i don't know where i am doing something that > is causing this. the problem is that i am working on a web portal entirely > in php. i have a few hidden pages. that do the queries to the DB. now when > i redirect

[PHP] Strange Problem

2003-07-13 Thread Haseeb
    Hi all, this is a very strange problem. i don't know where i am doing something that is causing this. the problem is that i am working on a web portal  entirely in  php. i have a few hidden pages. that do the queries to the DB. now when i redirect to any page for query i get this error CG

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread Gerard Samuel
Gerard Samuel wrote: A client-supplied value isn't going to be too useful - it can be spoofed, or may not be present. (I believe a Windows browser would set the mime-type based purely on the file extension, though I haven't tested this myself). Then my apologies. I thought php determined the f

[PHP] Lots of PHP

2003-07-13 Thread César Aracena
Hi all, I'm in the early steps of the design of a portal kid of site dedicated to Fly Fishing and one of the most relevant section will be a "Shopping Guru" that visitors will be able to use to determine what is the best equipment they should buy or bring, in order to catch the size and kind of tr

php-general Digest 14 Jul 2003 03:19:12 -0000 Issue 2174

2003-07-13 Thread php-general-digest-help
php-general Digest 14 Jul 2003 03:19:12 - Issue 2174 Topics (messages 155004 through 155037): Re: Weird Date problem driving me crazy... 155004 by: John W. Holmes 155013 by: Boaz Yahav Re: Need PHP on Win2000 Pro 155005 by: Simon Fredriksson 155008 by: John N

Re: [PHP] Grabbing info from other Sites

2003-07-13 Thread Suhas Pharkute
Why don't you use MSN services to get quotes. MSN does care for login. I am using this to get quotes after 15 minutes on my Cell Phone. I am using culr functions to get it. Suhas _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread Gerard Samuel
David Otton wrote: $_FILES['userfile']['type'] The mime type of the file, if the browser provided this information. An example would be "image/gif". So, check $_FILES['userfile']['type'] against a set of allowed file types, and you're set... A client-supplied value isn't going

RE: [PHP] Grabbing info from other Sites

2003-07-13 Thread Ow Mun Heng
Hi, Unfortunately, Yahoo.com is just an example.. The site really does need Login. The thing is this, I'm developing for an internal site, (My dept) but I need to access other dept's site to get info but unfortunately They won't give me access to query the db directly. Prefering me to go

RE: [PHP] ImageTTFText for mac? win? linux?

2003-07-13 Thread Ralph Guzman
http://www.codephobia.com/tutorials/view.php3?idnum=6 -Original Message- From: Miranda, Joel Louie M [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:04 AM To: '[EMAIL PROTECTED]' Subject: [PHP] ImageTTFText for mac? win? linux? Im confused.. I know I have TrueType support on php

Re: [PHP] Grabbing info from other Sites

2003-07-13 Thread Michael Geier
assuming the login isn't necessary (which it probably is), you could use something like Snoopy (http://sourceforge.net/projects/snoopy/) to POST/GET the required web page and process as required. Quoting Ow Mun Heng <[EMAIL PROTECTED]>: > Hi, > > I have this need/want to grab information

[PHP] Client script opensource plea

2003-07-13 Thread Larry Brown
This, most certainly OT, is a plea for fellow developers oriented in OpenSource solutions to help resolve a problem in case you have dealt with it before. I have written a PHP app that uses function keys at times to help speed data processing for my client VIA javascript. This app works fine when

[PHP] Grabbing info from other Sites

2003-07-13 Thread Ow Mun Heng
Hi, I have this need/want to grab information from sites for my own usage and wondering how to do it. Here's an example. 1. Log into finance.yahoo.com (assuming I need to log on) 2. Type the list of shares I want 3. Let Yahoo process it 4. Use PHP or some other scripting languag

[PHP] ImageTTFText for mac? win? linux?

2003-07-13 Thread Miranda, Joel Louie M
Im confused.. I know I have TrueType support on php. Now I wonder where will I put my fonts into my server? Like verdana, etc just a sample. Does this means even macintosh truetype fonts I can also load in? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.p

Re: [PHP] Replacing newlines (n) with smething else

2003-07-13 Thread Jason Giangrande
My problem is solved. Thank you to everyone who responded. Jason On Sun, 2003-07-13 at 18:33, David Nicholson wrote: > Hello, > > > This is a reply to an e-mail that you wrote on Sun, 13 Jul 2003 at 23:12, > lines prefixed by '>' were originally written by you. > > Maybe the browser you are u

Re: [PHP] session data missing

2003-07-13 Thread ulf sundin
I'm not the admin on the server, so I'll have to manage with the software provided. And that is php 4.0.6. I've tried a number of ways to store variables in the session file. This works: session_start(); $foo = 'bar'; session_register('foo'); then after session_write_close(); or end of script: ec

Re: [PHP] Replacing newlines (n) with smething else

2003-07-13 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Sun, 13 Jul 2003 at 23:12, lines prefixed by '>' were originally written by you. Maybe the browser you are using to fill in the form field is using a different type of line break. Although I have never seen it done, r by itself can be used to

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread Jason Giangrande
It's really strange because I type the following into the form field. Test Test Test And get this as output. Test Test Test Do form fields not preserve spacing or line breaks? Jason On Sun, 2003-07-13 at 17:45, David Otton wrote: > On 13 Jul 2003 17:27:04 -0400, you wrote: > > >Perh

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread David Otton
On 13 Jul 2003 17:27:04 -0400, you wrote: >Perhaps. When getting text from a form field, what is substituted for a >newline (i.e. when someone hits enter). You can work it out for yourself. Run over the string, displaying each character as it's ASCII equivalent with ord(). Eg for ($i =

[PHP] Re: PHP weirdness with files named tos.php

2003-07-13 Thread John A. Thomason
I'm running Apache 2/php/perl/mysql on Win2000 and tos.php worked. john [EMAIL PROTECTED] "Motorpsychkill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm running PHP 4.3.1 with Apache 2.0 on Windows XP. Everything works great > except if I name a file tos.php, Apache won't ser

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread Jason Giangrande
Perhaps. When getting text from a form field, what is substituted for a newline (i.e. when someone hits enter). Jason On Sun, 2003-07-13 at 17:21, David Otton wrote: > On 13 Jul 2003 17:01:24 -0400, you wrote: > > >I'm trying to replace newlines with something else. For this example > >I'll us

Re: [PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread David Otton
On 13 Jul 2003 17:01:24 -0400, you wrote: >I'm trying to replace newlines with something else. For this example >I'll use as the thing to replace a newline with. This is what I >tried and it doesn't work. nl2br() in the specific case >$article = str_replace("\n", "", $article); > >What am I d

Re: [PHP] Re: Replacing newlines (\n) with smething else

2003-07-13 Thread Jason Giangrande
I did not know about nl2br. Thanks. But what if say I want to replace a newline with something else, say . How would I do that? Jason On Sun, 2003-07-13 at 17:09, J. Cox wrote: > "Jason Giangrande" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I'm trying to rep

[PHP] Re: Replacing newlines (\n) with smething else

2003-07-13 Thread J. Cox
"Jason Giangrande" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm trying to replace newlines with something else. For this example > I'll use as the thing to replace a newline with. This is what I > tried and it doesn't work. > > $article = str_replace("\n", "", $arti

[PHP] PHP weirdness with files named tos.php

2003-07-13 Thread motorpsychkill
I'm running PHP 4.3.1 with Apache 2.0 on Windows XP. Everything works great except if I name a file tos.php, Apache won't serve it. I'm not really sure if this is an Apache or PHP thing. Can anyone else replicate this error on their machines? Thanks! -- PHP General Mailing List (http://www.p

[PHP] Replacing newlines (\n) with smething else

2003-07-13 Thread Jason Giangrande
Hi, I'm trying to replace newlines with something else. For this example I'll use as the thing to replace a newline with. This is what I tried and it doesn't work. $article = str_replace("\n", "", $article); What am I doing wrong? $article is the string to replace the newlines in. I tried t

Re: [PHP] MySql Rollback in PHP within a website

2003-07-13 Thread John W. Holmes
bruce wrote: I have a question. I need to be able to try to perform a database update, but if it doesn't succeed, I need to be able to rollback the changes, and to inform the user that the changes didn't succeed. I've looked at the MySql site, and can see somewhat how the Commit/RollBack functions

[PHP] MySql Rollback in PHP within a website

2003-07-13 Thread bruce
Hey... I have a question. I need to be able to try to perform a database update, but if it doesn't succeed, I need to be able to rollback the changes, and to inform the user that the changes didn't succeed. I've looked at the MySql site, and can see somewhat how the Commit/RollBack functions work

[PHP] Turning string into a table

2003-07-13 Thread zavaboy
Is there a way to make for example: // (Column info) // String 1: [This column holds [Col 1] [Col 2]] [This second column holds [Col 3] [Col 4]] // (Row) // String 2: [Col 1 (row1)] [Col 2 (row1)] [Col 3 (row1)] [Col 4 (row1)] // (Row) // String 3: [Col 1 (row2)] [Col 2 (row2)] [Col 3 (row2)] [C

[PHP] About fopen() for write and PHP settings

2003-07-13 Thread George Papatheodorou
First of all I apology for my poor use of English of my newbish(?) questions because I didn't find any solutions the first time I e-mailed this list. What my problem is: I am on a server that has these configurations like these: http://kainga.quasarnet.org/php.php . Let's say my username is user1 a

RE: [PHP] Weird Date problem driving me crazy...

2003-07-13 Thread Boaz Yahav
Thanks John, your answer is right on the $$$. Changing the query to something like : SELECT UNIX_TIMESTAMP(ProblemStart) as ProblemStart solved the problem. Do i feel sheepish... actually double sheepish cause i already solved this long ago and forgot about it :( Sincerely berber Visit http:/

Re: [PHP] How does PHP interact when using Java?

2003-07-13 Thread Ray Hunter
Not to sure how they work together in a php environment, however another alternative it so use php in a java (servlet,j2ee) environment. It is harder to set up, however, there are not as many errors. Sometimes there is a performance increase. -- BigDog On Sun, 2003-07-13 at 01:50, Jan Bro wrote:

Re: [PHP] Code and Good Design Methods

2003-07-13 Thread Ray Hunter
True xsl(t) is a language in and of itself along with xpath, xpointer, and a host of others. However, it is safe to point out that this is another alternative that can be reviewed. It possibly may be the hardest to incorporate; however, it needs to be mentioned as well. -- BigDog On Sun, 2003-0

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread David Otton
On Sun, 13 Jul 2003 13:32:00 -0400, you wrote: >The upload process, already collects info on file types when you upload. > From the manual -> > >> $_FILES['userfile']['type'] >> >> The mime type of the file, if the browser provided this >> information. An example would be "image/gif". >> >

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread Gerard Samuel
The upload process, already collects info on file types when you upload. From the manual -> $_FILES['userfile']['type'] The mime type of the file, if the browser provided this information. An example would be "image/gif". So, check $_FILES['userfile']['type'] against a set of allowed file

Re: [PHP] Need PHP on Win2000 Pro

2003-07-13 Thread John Nichel
Simon Fredriksson wrote: When I make console scripts for *nix in PHP I have the shebang line and after that #!/usr/bin/php -q Is PHP as powerful as perl on the console area yet? In my opinion, no. But Perl has a big head start on php when it comes to system scripts (not to mention that PHP is

Re: [PHP] Is it possible to test an uploaded file to check the type?

2003-07-13 Thread Marek Kilimajer
If you have compiled php with --enable-mime-magic, you can use mime_content_type() Dan Anderson wrote: Is it possible to check a file in $_FILES['userfile']['tmp_name'] to make sure it is of a certain format? I want to allow a user to only upload jpegs or mpegs, and want to check what format th

Re: [PHP] Private and protected variables in PHP 5?

2003-07-13 Thread Marek Kilimajer
Don't have the possibilities to try it out now, but I think you are wrong: Example: class Parent { protected $var = "test"; function blah($somevar) { ... } } class Child extends Parent { ... } $parent = new Parent; print $parent->var; //ouputs "test" This will error out, y

Re: [PHP] Need PHP on Win2000 Pro

2003-07-13 Thread Simon Fredriksson
When I make console scripts for *nix in PHP I have the shebang line and after that #!/usr/bin/php -q Is PHP as powerful as perl on the console area yet? //Simon John A. Thomason wrote: Thanks for your help. Also, I checked out your tutorial and Apache and PHP. I have Apache installed, and I a

Re: [PHP] Weird Date problem driving me crazy...

2003-07-13 Thread John W. Holmes
Boaz Yahav wrote: I have two date strings coming out from MySQL. Both fields are defined as datetime. When i come to print them like this : Echo"Ticket Opened : " . date("l, F jS Y H:i",$row->OpenDate) . ""; Echo"Problem Start : " . date("l, F jS Y H:i",$row->ProblemStart) . "";

php-general Digest 13 Jul 2003 14:58:27 -0000 Issue 2173

2003-07-13 Thread php-general-digest-help
php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 Topics (messages 154985 through 155003): Re: touch file on shared web server? 154985 by: Paul O'Neil 154991 by: Jason Wong Re: Code and Good Design Methods 154986 by: zbranigan 154987 by: zbranigan

Re: [PHP] dump $_POST into variables????

2003-07-13 Thread Marek Kilimajer
Remember this is identical to having register_globals on with the same security risks. Read http://www.php.net/register_globals first. Joe Harman wrote: Ah... Jason Man Of Few Words! THANKs... You have saved me time and lines in my code :-) extract() -- PHP General Mailing List (http://

Re: [PHP] OK, So I am new to these List. Win2000 help!

2003-07-13 Thread John Nichel
John A. Thomason wrote: Thanks, that did it. And yes, I am trying to run this as a shell script. Thank you very much. John. - Original Message - From: "John Nichel" <[EMAIL PROTECTED]> To: "John A. Thomason" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, July 12, 2003 10:01 P

Re: [PHP] Need PHP on Win2000 Pro

2003-07-13 Thread John A. Thomason
Thanks for your help. Also, I checked out your tutorial and Apache and PHP. I have Apache installed, and I am using it for backend work. I have been using Perl, but have discovered PHP, and want to be able to use it on the command line. Another email told me the solution. Replace the shebang line w

Re: [PHP] Need PHP on Win2000 Pro

2003-07-13 Thread Burhan Khalid
On Saturday, July 12, 2003, 10:31:14 PM, John wrote: JAT> Hello, JAT> I need some advice on getting PHP 4 up and running on my Windows 2000 JAT> Professional. I have followed all of the instructions in the installation JAT> file, but when I try to run a PHP as a batch from the command prompt, all

[PHP] php script billing receipt

2003-07-13 Thread Duncan
Hi, I just finished a script for an US company and now have to provide them with a billing receipt stating my work and the price for it. google didn't come up with anything usefull, most search results came up with billing scripts and not an example text of such a billing receipt. Does anyone ha

[PHP] Weird Date problem driving me crazy...

2003-07-13 Thread Boaz Yahav
I have two date strings coming out from MySQL. Both fields are defined as datetime. When i come to print them like this : Echo"Ticket Opened : " . date("l, F jS Y H:i",$row->OpenDate) . ""; Echo"Problem Start : " . date("l, F jS Y H:i",$row->ProblemStart) . ""; I get : Ticket O

[PHP] How does PHP interact when using Java?

2003-07-13 Thread Jan Bro
Hi, I've just got PHP working with Java. It connects to a remote Oracle DB with Java and without the Oracle Client installed on my machine, it's sure a beauty. What I was wondering, what's behind it, I mean how does it work? I transfer Objects in Java and get data out. How do PHP and Java interact,

[PHP] Re: Mailing list server with PHP frontend

2003-07-13 Thread Paul Chvostek
On Sat, Jul 12, 2003 at 08:17:03PM -0300, Manuel Lemos wrote: > > You may want to try this class for creating lists with the ezmlm mailing > list manager. It has support for creating and editing the lists > properties and even has a SOAP interface for accessing the subscriptions > from remote m

Re: [PHP] Code and Good Design Methods

2003-07-13 Thread Robert Cummings
Let's be honest, XSL is is one big logic step itself -- moreover it's a whole other language to learn. Cheers, Rob. On Sun, 2003-07-13 at 02:07, Ray Hunter wrote: > Also u could build your own system that is php xml and xslt based. That > will really help you separate the logic from the presentat