Re: [PHP] free php live support script ?

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 18:35 -0800, Robby Russell wrote:
> On Tue, 2004-11-16 at 21:40 -0400, Mario Bittencourt wrote:
> > Hi,
> > 
> > I was wondering if there is any free php live support script ?
> > 
> > I'd like to add a "chat room" in my web site so users could chat with
> > a human operator in a 1-1 mode.
> > 
> > thanks.
> > 
> 
> We use this program for live support with our customers.
> 

Oops, it helps when I post the link. ;-)

http://www.cslh.com/


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


RE: [PHP] XML + PHP is going to eat my shorts [SOLVED]

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 09:50 -0600, Jay Blanchard wrote:
> [snip]
> >
> [/snip]
> 
> using fread the above line comae out like this(even though I was not
> echoing the line, just processing)
> 
> 
> 
> ...as soon as I added stripslashes the syntax error disappeared and
> VIOLA!...xml file parsing at its finest!

Wow, that's a first for me.  Will have to look out for that. I've been
parsing XML for quite a while now, and I guess never ran into this
issue.

-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 09:01 -0600, Jay Blanchard wrote:
> [snip]
> xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
> xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1);
> [/snip]
> 
> I had those in there as well...here is the first few liners of the XML
> source
> 
> 
> http://the.api.server/dtd/response.dtd"; >
I think that space after the closing " might be causing your grief.

(Sorry for my out of sync response ... the new version of Evolution is
not threading the list messages properly).

-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Weird virtual() behavior for nested require()

2004-11-16 Thread Paul Cantrell
Well, after 36 hours of silence on this one, I'll consider the 
php-general list stumped, and file it as a bug.

P
On Nov 15, 2004, at 11:50 AM, Paul Cantrell wrote:
I'm getting a weird behavior when virtual() calls another page that 
uses a require().  The behavior seems contrary to the docs for 
virtual.

Consider these four files:
-- foo.php --
This is foo.

-- foo.shtml --
This is foo.

-- subdir/bar.php --
This is bar.

-- subdir/baz.php --
This is baz.
According to the docs, virtual() handles the argument as an Apache 
subrequest -- in other words, it should be equivalent to an SSI 
include.  But it's not.  As I would expect, foo.shtml produces this:

This is foo. This is bar. This is baz.
Here's what I get from foo.php:
This is foo. This is bar.
Warning: main(./baz.php): failed to open stream: No such file or 
directory in
/blah/blah/blah/subdir/bar.php on line 2

Fatal error: main(): Failed opening required './baz.php' 
(include_path='.:/usr/local/lib/php')
in /blah/blah/blah/subdir/bar.php on line 2

Oddly, it works if bar.php says require('baz.php') instead of 
require('./baz.php').  That smells really bad.  Is this a bug, or am I 
missing something?

Cheers,
Paul
_
"After hearing ten thousand explanations, a fool is no wiser.
 But an intelligent person needs only two thousand five hundred."
   -- Mahabharata
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

_
"Prediction is hard, especially of the future."  -- Niels Bohr
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] XML + PHP is going to eat my shorts

2004-11-16 Thread Burhan Khalid
On Tue, 2004-11-16 at 08:51 -0600, Jay Blanchard wrote:
> [snip]
> > 
> > 
> > ... it throws an error from xml_get_error_code
> 
>   Trim your xml file.  Whitespace can cause this problem.
> [/snip]
> 
> I trimmed and chopped to no avail. Argh.
Try this snippet which has worked for me in the past.  If you can email me the 
xml file in question, I can run
it through my parser directly.

Anyway, hope this helps:

while ($data = fread($fp, 4096)){
   $data=eregi_replace(">"."[[:space:]]+"."<","><",$data);
   if (!xml_parse($xmlparser, $data, feof($fp))) {
  $reason = xml_error_string(xml_get_error_code($xmlparser));
  $reason .= xml_get_current_line_number($xmlparser);
  die($reason);
   }
}
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to path global object

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 00:01, Hongwei Li wrote:

> no values are displayed.  Apparently, $obj is not pathed to tsnext.php and
> tsshow.php (the second time), but $ind is.  What is wrong in the above
> codes?  Can somebody help me?

You seem to have a fundamental misunderstanding of what the keyword 'global' 
does. Read

  manual > Variables > Variable scope

study and *understand* the examples.

Now the reason why $ind seems to be passed onto tsnext.php is that:

1) global $ind defines a new variable that has a 'value' of NULL
2) $ind++ implicitly converts $ind to 0 (zero) then increments it
3) hence echo $ind shows 1

Summary: if you want to pass values from one page to another either do so 
using the URL, or by storing them in sessions.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
In war it is not men, but the man who counts.
  -- Napoleon
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Date Conversions?

2004-11-16 Thread Justin French
On 16/11/2004, at 6:29 AM, Robert Sossomon wrote:
I have a date in format YY-MM-DD in a MySQL table.  I need to pull it 
back to display it in either format: MM-DD-YY or Month Day, Year 
format.
Do it in PHP, not in the query, IMHO.

You can also experiment with strtotime()... the catch will be the 2 
digit year format, so you might have to either

a) assume the first two digits
b) accept PHP's assumptions on the first two digits
c) fix your database now into 4 digit format, to make it future proof 
and a lot more solid


The reason I wouldn't do this in the query is that you're relying on 
features of the particular SQL platform, version or table.  By moving 
that conversion back to PHP and keeping your queries simple and as 
standard as possible, you're going to be a lot happier if your 
environment changes.

But that's just the way I work :)
Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] how to parse a string parse with ereg

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 07:17, [EMAIL PROTECTED] wrote:

> But it has one weakness. In the case the device (ppp0) is
> missing somewhere in the output as the user didn't intend
> to integrate this required information, and by having insight
> it could be more than 10 lines with 10.000 rules of
> netfilter, explode will show concerning this example of 3
> lines 2 defined arrays and it won't lead to an error as
> explode doesn't give a return value back which
> has not been proofed to be exploded with _XrR.
>
> As I want to proof the syntax of all lines this is
> wrong and not usable.

I have to admit I'm not following you. My suggestion that you use explode() 
was based on the premise that you have a bunch of lines:

...
xxx.x.x.x   0.0.0.0 255.255.255.255 UH 0      0        0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U    0      0        0 eth1
0.0.0.0     xxx.x.x.x 0.0.0.0     UG   0      0        0 ppp0
...

that are currently stored in a string. After explode() you can use foreach() 
to loop through the array and check each line individually. Then based on 
whether the line passes the check you could either:

a) unset that array element (doesn't pass check so get rid of it)

or

b) copy that element to a new array (passes check so store it in a 'good' 
array)

Either way you'll end up with an array containing only 'good' lines.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Microsoft broke Volkswagen's world record:  Volkswagen only made 22 million
bugs!
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: free php live support script ?

2004-11-16 Thread Manuel Lemos
Hello,
On 11/16/2004 11:40 PM, Mario Bittencourt wrote:
I was wondering if there is any free php live support script ?
I'd like to add a "chat room" in my web site so users could chat with
a human operator in a 1-1 mode.
There are some solutions here you may want to try:
http://www.phpclasses.org/browse/class/66.html
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mp3 parsing

2004-11-16 Thread Ryan King
On Nov 16, 2004, at 7:24 PM, Manuel Lemos wrote:
Hello,
On 11/16/2004 10:58 PM, Ryan King wrote:
Anyone out there have a way to read the header info out of an mp3 
file? I'm able to parse out the id3 tags, but am having trouble 
finding a way to read the header info. The info I'm trying to get is 
the playtime and bitrate.
Here you can find several solutions that can do exactly that:
http://www.phpclasses.org/browse/class/34.html
Ah, I had tried phpclassses.org before but didn't find what I needed.  
Most of those classes only do id3 tags, while I need the frame headers, 
too. I see now that there is a class there that will help.

thanks,
ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] isset opposite

2004-11-16 Thread Dustin Krysak
Yeah as soon as I saw this example, I figured that was the case for 
example something like

if (!empty())
and so on.
d
On 16-Nov-04, at 5:26 PM, Robby Russell wrote:
On Tue, 2004-11-16 at 17:19 -0800, Dustin Krysak wrote:
Thanks!
perfect!
d
For future reference, just about any function that uses is at the
beginning should return a boolean result. So if (is_array()) can also 
be
checked with if (!is_array())

This should apply to all the php included functions that start with is.
-Robby
--
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] free php live support script ?

2004-11-16 Thread Mario Bittencourt
Hi,

I was wondering if there is any free php live support script ?

I'd like to add a "chat room" in my web site so users could chat with
a human operator in a 1-1 mode.

thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] isset opposite

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 17:19 -0800, Dustin Krysak wrote:
> Thanks!
> 
> perfect!
> 
> d

For future reference, just about any function that uses is at the
beginning should return a boolean result. So if (is_array()) can also be
checked with if (!is_array())

This should apply to all the php included functions that start with is. 

-Robby
-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


RE: [PHP] Question on query string

2004-11-16 Thread Robby Russell
On Wed, 2004-11-17 at 11:28 +1100, Jason Oakley wrote:
> I think maybe
> 
> $jtitle=$HTTP_GET_VARS['JTitle'];
> 

Might I remind you that $_HTTP_*_VARS is deprecated..

$_GET
$_POST
 (it's also much quicker to type)

-Robby


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Jonel Rienton
It works flawlessly on my mac os panther 10.3.6, i wonder what build of 
mac os they are using.
I can type in on all the textfields.

--
I not know English well, but I know 7 computer languages.
anonymous
On Nov 16, 2004, at 2:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users 
can go a fill out a simple form and submit it to our support 
department using the post method. For users on PC's, this works 
flawlessly. I am getting complaints from people who use Macintosh who 
say that they are not able to type in certain fields. The fields in 
question are text boxes. There is not anything special about the code 
(snippet at the end of this email). They are hitting the issue using 
Safari, Netscape, or IE and with varying versions of each. Has anyone 
out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the 
conditions above
I do not agree with 
the conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mp3 parsing

2004-11-16 Thread Manuel Lemos
Hello,
On 11/16/2004 10:58 PM, Ryan King wrote:
Anyone out there have a way to read the header info out of an mp3 file? 
I'm able to parse out the id3 tags, but am having trouble finding a way 
to read the header info. The info I'm trying to get is the playtime and 
bitrate.
Here you can find several solutions that can do exactly that:
http://www.phpclasses.org/browse/class/34.html
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] free php live support script ?

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 21:40 -0400, Mario Bittencourt wrote:
> Hi,
> 
> I was wondering if there is any free php live support script ?
> 
> I'd like to add a "chat room" in my web site so users could chat with
> a human operator in a 1-1 mode.
> 
> thanks.
> 

We use this program for live support with our customers.

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] isset opposite

2004-11-16 Thread Dustin Krysak
Thanks!
perfect!
d
On 16-Nov-04, at 4:13 PM, Robby Russell wrote:
On Tue, 2004-11-16 at 15:11 -0800, Dustin Krysak wrote:
Hi there.. I am pretty new to PHP, and I am familiar with php "isset"
option now i was wondering (I have looked at the PHP site - 
but
can not find it) how can you check if something is not set? I need to
test if a $_GET is not set (not just empty).

thanks in advance!
d
isset() returns a boolean.
so...try,
if (!isset($x))
--
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: handling tag and quote (' & ")

2004-11-16 Thread Matthew Weier O'Phinney
* Adwinwijaya <[EMAIL PROTECTED]>:
> Hello php-general,
> Is there suggestion about how to remove html tag, javascript and quote
> (' & ") from user's input at the same time ?

Yes.

Oh, you wanted an example?

$value = preg_replace('/[\'\"]/', '', strip_tags($value));

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] handling tag and quote (' & ")

2004-11-16 Thread Greg Donald
On Wed, 17 Nov 2004 10:28:30 +1100, adwinwijaya
<[EMAIL PROTECTED]> wrote:
> Hello php-general,
> 
> I have question for you :)
> 
> Is there suggestion about how to remove html tag, javascript and quote
> (' & ") from user's input at the same time ?

strip_tags()
str_replace()


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question on query string

2004-11-16 Thread Robert Cummings
On Tue, 2004-11-16 at 20:24, Robby Russell wrote:
> On Wed, 2004-11-17 at 11:28 +1100, Jason Oakley wrote:
> > I think maybe
> > 
> > $jtitle=$HTTP_GET_VARS['JTitle'];
> > 
> 
> Might I remind you that $_HTTP_*_VARS is deprecated..
> 
> $_GET
> $_POST
>  (it's also much quicker to type)

And not as backward compatible.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mp3 parsing

2004-11-16 Thread Ron Stiemer
Hi,

maybe this wil help you...i made this some time ago...

Titel: " . $title . "" .
"Band: " . $band  . "" .
"Album: " . $album . "" .
"Jahr: " . $year  . "" .
"Kommentar: " . $comment . "";

fclose( $value );
}

ShowID3( "test.mp3", "" );

?>

Regards,
Ron

Am Mittwoch, 17. November 2004 01:58 schrieb Ryan King:
> Anyone out there have a way to read the header info out of an mp3 file?
> I'm able to parse out the id3 tags, but am having trouble finding a way
> to read the header info. The info I'm trying to get is the playtime and
> bitrate.
>
> thanks,
> ryan

-- 


pgp9hzPkvKAq5.pgp
Description: PGP signature


[PHP] mp3 parsing

2004-11-16 Thread Ryan King
Anyone out there have a way to read the header info out of an mp3 file? 
I'm able to parse out the id3 tags, but am having trouble finding a way 
to read the header info. The info I'm trying to get is the playtime and 
bitrate.

thanks,
ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: [PHP-DB] OOP vs Functions and includes]

2004-11-16 Thread Jonel Rienton

 Original Message 
Subject: Re: [PHP-DB] OOP vs Functions and includes
From: "Jonel Rienton" <[EMAIL PROTECTED]>
Date: Tue, November 16, 2004 7:04 pm
To: <[EMAIL PROTECTED]>

Hi again Pablo,

not sure how the inner workings of PHP are as far as instantiating new
classes. other languages i've used only (jit-)compile methods/member
functions as they are called thus reducing the amount of memory in
instantiating objects.

regards,
Jonel

> Thanks for your response Jonel.
> I mistakenly posted this in the PHP-DB list, I wanted to do it in the
> General list instead.
> Anyway, I heard those words you mention in several OOP introduction
> sites   but I guess never understood it.
> I'll try to re-read that focsing in them.
>
> One question tho, I saw classes use functions within them... dont they
> require more "memory" on the server side ?
> Thanks !
>
> Pablo.
>
>
>
> On Tue, 16 Nov 2004 18:40:51 -0600 (CST), Jonel Rienton
> <[EMAIL PROTECTED]>   wrote:
>
>> Hi Pablo,
>>
>> The 3 main strong points of using OOP are:
>>
>> 1. Encapsulation
>> 2. Inheritance
>> 3. Polymorphism
>>
>> I like using OOP instead of includes because of these points.  It
>> helps   me
>> alot in doing maintenance releases using this technique instead of
>> having to deal with thousands of codes which can be abstracted from
>> me with encapsulation for instance.
>>
>> regards,
>> Jonel
>>
>>> Hi, This is my first post. English is my 2nd language so I apologize
>>> for
>>>   any mistakes I might have.
>>>
>>> I would describe myself as an intermediate self-thaught PHP
>>> programmer,
>>>  which means I can do lots of stuff but probly my coding techniques
>>> sucks :P
>>>
>>> Anyway, Im reading a lot about OOP lately, and I've fixing other's
>>> people   scripts which use OOP for "small" stuff that could have
>>> been acomplished   with simple functions or includes maybe... so I
>>> started wondering, why use   OOP when you can use something
>>> simpler...
>>>
>>> Imagine the following example:
>>> A table of MySQL on a simple classifieds site holds the info for
>>> each Ad
>>>   posted ( timestamp, user who posted it, title, description,
>>> location,
>>>  country, etc).
>>> A php page called ads.php gets the ad ID via $_GET and prints out
>>> its information in a nicely formated page.
>>>
>>> What I usually do is to put all the "echo-ing" part of this page in
>>> a separate include (ie: ads_details.php ), so that if I need to also
>>> show
>>>  this in another page, I call the same include.  If I decide to do a
>>> change   later, I only have to change it in one part of the script
>>> alone.
>>>
>>> What I've seen a lot lately is that people do the same with classes
>>> (they   write a class that will output the same thing I output thru
>>> an include)...   so I guess there must be  pros and cons regarding
>>> using both methods...
>>>
>>> Could anyone point me to a good reading (free, internet) material to
>>> read   about this or any other advice so I continue learning about
>>> OOP and when   to use it ?
>>>
>>> If you read it all the way down here THANKS !  :D
>>>
>>> Pablo Fernandez-Stearns
>>> BA. Argentina.
>>>
>>> --
>>> PHP Database Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


-- 


-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] bubble sort crashing apache

2004-11-16 Thread Thomas Goyne
On Tue, 16 Nov 2004 15:43:51 -0500, Josh Howe <[EMAIL PROTECTED]> wrote:
I've implemented my own bubble sort function that is crashing apache.
Can somebody either help me out with the bubble sort or help me figure
out a way to solve my problem with php's built in sorting functions?
http://us4.php.net/manual/en/function.sort.php

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
http://www.smempire.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question on query string

2004-11-16 Thread Jason Oakley
I think maybe

$jtitle=$HTTP_GET_VARS['JTitle'];

--
Jason Oakley
Robina Helpdesk
AAPT Limited
Ph: 07 5562 4359

[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
]On Behalf Of Stuart Felenstein
Sent: Wednesday, 17 November 2004 9:38 AM
To: Ford, Mike; '[EMAIL PROTECTED] '
Subject: RE: [PHP] Question on query string



--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:

> > //Textfields / Dropdown
> > $HTTP_GET_VARS['JTitle'];
> > $HTTP_GET_VARS['City'];
> > $HTTP_GET_VARS['Days']; 
> 
> And thrice ditto.
> 
They looked good, gone now :)

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
This communication, including any attachments, is confidential. If 
 you are not the intended recipient, you should not read it - please 
 contact me immediately, destroy it, and do not copy or use any part of 
 this communication or disclose anything about it.

--

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object oriented programming

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 15:39 -0800, Matthew Sims wrote:
> It's a new way of writing out programs that
> many new languages are taking in.

OO programming is definitely not a "new" way of writing programs.

> SIMULA I (1962-65) and Simula 67 (1967) are the two first
> object-oriented languages. Simula 67 introduced most of the key
> concepts of object-oriented programming: both objects and classes,
> subclasses (usually referred to as inheritance) and virtual
> procedures, combined with safe referencing and mechanisms for bringing
> into a program collections of program structures described under a
> common class heading (prefixed blocks).

Pretty sure that probably out dates many of the people subscribed to the
list. ;-) (i included..)

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] isset opposite

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 15:11 -0800, Dustin Krysak wrote:
> Hi there.. I am pretty new to PHP, and I am familiar with php "isset" 
> option now i was wondering (I have looked at the PHP site - but 
> can not find it) how can you check if something is not set? I need to 
> test if a $_GET is not set (not just empty).
> 
> thanks in advance!
> 
> d
> 

isset() returns a boolean.

so...try,

if (!isset($x))


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] isset opposite

2004-11-16 Thread Ryan King
On Nov 16, 2004, at 5:11 PM, Dustin Krysak wrote:
Hi there.. I am pretty new to PHP, and I am familiar with php "isset" 
option now i was wondering (I have looked at the PHP site - 
but can not find it) how can you check if something is not set? I need 
to test if a $_GET is not set (not just empty).
!array_key_exists('yourkey', $_GET);
-ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] isset opposite

2004-11-16 Thread Greg Donald
On Tue, 16 Nov 2004 15:11:39 -0800, Dustin Krysak
<[EMAIL PROTECTED]> wrote:
> how can you check if something is not set?

!isset()

-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DB] OOP vs Functions and includes

2004-11-16 Thread Bruno B B Magalhães
Pablo,
This is a very complex discussion... But generalizing, a LOT, OO is  
more appropriated for big systems due to its extensibility and easy  
maintenance, while procedural approach works best for small  
applications that don't require to much updates and aren't too complex.

Here is a example of a controller of my framework, can you imagine it  
using procedural approach?  
(http://www.yourhostname.com/controller/articles)

http://www.bbbm.com.br/
* @copyright 2004 Bruno B B Magalhaes
* @author Bruno B B Magalhaes <[EMAIL PROTECTED]>
* @package BBBM Framework
* @version 0.7-dev
*/
define('FRAMEWORK_DIR',dirname(__FILE__).'/framework/');
require_once(FRAMEWORK_DIR.'framework.inc.php');
/**
* Starting Framework
*/
$framework = new framework();
/**
* Checking if it's a valid and installed Controller
*/
if(isset($framework->input->uri['1']))
{
	$framework->benchmark->mark('framework','loading_called_controller');
	if(!$framework->load_controller($framework->input->uri['1']))
	{
		echo '[FRAMEWORK FATAL ERROR] There are no registered or active  
controllers!';
		exit;
	}
}
else
{
	$framework->benchmark->mark('framework','loading_default_controller');
	if(!$framework->load_controller())
	{
		echo '[FRAMEWORK FATAL ERROR] There are no registered or active  
controllers!';
		exit;
	}
}

/**
* Getting all modules from this controller and module information from  
database
*/
$framework->benchmark->mark('framework','loading_controller_modules');
$framework->modules->get_modules($framework- 
>controller['controllerPath']);

/**
* Configuring Output (Templates dirs, Compile dirs, etc)
*/
$framework->benchmark->mark('framework','configuring_controller');
$framework->output->configure_controller($framework- 
>controller['controllerPath']);

/**
* If a controller needs authentication, try to authenticate!
*/
$framework->benchmark->mark('framework','authenticating_controller');
$framework->authentication->authenticate($framework- 
>controller['controllerPath'],$framework- 
>controller['controllerLevel']);
if(!$framework->authentication->authenticated)
{
	if(isset($framework->authentication->errormsg))
	{
		$framework->output->assign('errormsg',$framework->authentication- 
>errormsg);
	}
	$framework->output->display($framework- 
>controller['controllerPath'].'.templates/login.tpl',session_id());
	$framework->benchmark->stop('framework');
	exit;
}
	
/**
* Getting Module Information, if exists, else get the default module  
for this controller
*/
if(isset($framework->input->uri['2']))
{
	$framework->benchmark->mark('framework','loading_called_module');
	$framework->modules->get_module($framework->input->uri['2']);
}
else
{
	$framework->benchmark->mark('framework','loading_default_module');
	$framework->modules->get_module();
}

/**
* Starting module initialization routines
*/
$framework->benchmark->mark('framework','initializing_module');
if(isset($framework->modules->module) && $framework->modules->module !=  
'' && $framework->modules->module != false &&  
is_array($framework->modules->module))
{
	/**
	* If a module needs authentication, try to authenticate!
	*/
	$framework->benchmark->mark('framework','authenticating_module');
	if($framework->controller['controllerLevel'] <  
$framework->modules->module['moduleLevel'])
	{
		$framework->authentication->authenticate($framework->modules- 
>module['modulePath'],$framework->modules->module['moduleLevel']);
		if(!$framework->authentication->authenticated)
		{
			if(isset($framework->authentication->errormsg))
			{
$framework->output->assign('errormsg',$framework->authentication- 
>errormsg);
			}
			$framework->output->display($framework- 
>controller['controllerPath'].'.templates/login.tpl',session_id());
			$framework->benchmark->stop('framework');
		}
	}
	
	/**
	* Checking if the called module is an alias, and if the alias exists  
and exits after it!
	*/
	$framework->benchmark- 
>mark('framework','checking_and_loading_alias_module');
	if($framework->modules->module['moduleType'] == 'alias')
	{
		if(isset($framework->modules->module['moduleAliasPath']) &&  
$framework->modules->module['moduleAliasPath'] != '' &&  
file_exists(FRAMEWORK_DIR.$framework- 
>controller['controllerPath'].'.aliases/'.$framework->modules- 
>module['moduleAliasPath'].'.func.php'))
		{
			include_once(FRAMEWORK_DIR.$framework- 
>controller['controllerPath'].'.aliases/'.$framework->modules- 
>module['moduleAliasPath'].'.func.php');
		}
		elseif(isset($framework->modules->module['modulePath']) &&  
$framework->modules->module['modulePath'] != '' &&  
file_exists(FRAMEWORK_DIR.$framework- 
>controller['controllerPath'].'.aliases/'.$framework->modules- 
>module['modulePath'].'.func.php'))
		{
			include_once(FRAMEWORK_DIR.$framework- 
>controller['controllerPath'].'.aliases/'.$framework->modules- 
>module['modulePath'].'.func.php');
		}
		else
		{
			echo '[MODULE INITIALIZATION] No module to load!';
		}
		exit;
	}
	
	/**
	* Including module
	*/
	$framework->benchmark->mark('framework','includin

RE: [PHP] Question on query string

2004-11-16 Thread Chris W. Parker
Stuart Felenstein 
on Tuesday, November 16, 2004 1:35 PM said:

> I'm not seeing what is incorrect. I did try
> $HTTP_GET_VARS['Ind'] = urldecode('Ind'); (in
> searchresults.php) but of course it wasn't imploded
> yet.  I don't want to confuse this question or myself
> (or anyone) , but maybe I should do the implodes on
> search.php ?

Did you purposefully ignore my previous email??? Someone else I think
mentioned this in another email in this thread also. Why are you
assigning anything to $HTTP_GET_VARS at all? It's meant to retrieve
data.

// (again) this is how you use urldecode()
$Ind = urldecode($_GET['Ind']);



Chris.

p.s. i think your keyboard may be broken. there always seems to be a
space in front of your commas, question marks, and exclamation points.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] isset opposite

2004-11-16 Thread Matthew Sims
> Hi there.. I am pretty new to PHP, and I am familiar with php "isset"
> option now i was wondering (I have looked at the PHP site - but
> can not find it) how can you check if something is not set? I need to
> test if a $_GET is not set (not just empty).
>
> thanks in advance!
>
> d
>


I'm sure I'll be one of the many who says this:

!isset

The ! means not. You can use it with most of the functions like !empty
(not empty).

So you can use it like so:

if (!isset($_GET["var"])) {
  do stuff
}

-- 
--Matthew Sims
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein

--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:

> > //Textfields / Dropdown
> > $HTTP_GET_VARS['JTitle'];
> > $HTTP_GET_VARS['City'];
> > $HTTP_GET_VARS['Days']; 
> 
> And thrice ditto.
> 
They looked good, gone now :)

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein

--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote:

> Did you purposefully ignore my previous email???
> Someone else I think
> mentioned this in another email in this thread also.
> Why are you
> assigning anything to $HTTP_GET_VARS at all? It's
> meant to retrieve
> data.
> 
> // (again) this is how you use urldecode()
> $Ind = urldecode($_GET['Ind']);
> 
Chris I did not ignore your email  I tried using that
code.  A warning came back that urldecode was
expecting a string not an array.  This is why I posted
the followup wondering if I should impode the array
and then assign the urldecode.

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object oriented programming

2004-11-16 Thread Matthew Sims
> Hello my friends, how can I get a tutorial or book about Object Oriented
> Programming (OOP) in PHP, if is posible about PHP 5, I am beginning in use
> PEAR, and almost librarys are in OOP. Can you help me?
>
> Thanks :)
>procedural
>  =
> "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo
> de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti"
>
> Isa 40:27
>  =
>
> Atte   Pedro Irán Méndez Pérez

I've been learning my OO with Advanced PHP Programming by George
Schlossnagle. It's strictly for PHP5.

http://www.amazon.com/exec/obidos/ASIN/0672325616/qid=1100647513/sr=2-1/ref=pd_ka_b_2_1/002-6966928-3341645

But Object-Oriented Programming isn't necessarily a PHP thing but more of
an ideology of programming. It's a new way of writing out programs that
many new languages are taking in. If you're already comfortable writing
procedual programs with PHP than PHP can be a good stepping stone
introduction into the land of OO.

-- 
--Matthew Sims
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] handling tag and quote (' & ")

2004-11-16 Thread adwinwijaya
Hello php-general,

I have question for you :)

Is there suggestion about how to remove html tag, javascript and quote
(' & ") from user's input at the same time ?

thx ;)

-- 
Best regards,
adwin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object oriented programming

2004-11-16 Thread daniel
> Hello my friends, how can I get a tutorial or book about Object
> Oriented Programming (OOP) in PHP, if is posible about PHP 5, I am
> beginning in use PEAR, and almost librarys are in OOP. Can you help me?
>
> Thanks :)
>

PEAR is the best thing that happen to PHP even though its a CPAN for PHP :)
But alot of the codebase is still not PHP5 code, i think alot of it is
still PHP4 codebase :|

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Patrick Volkerding Battles Mystery Illness

2004-11-16 Thread Matthew Sims
> This:
>
> http://slashdot.org/article.pl?sid=04/11/16/1846207
>
> That sucks.
>
> If anyone knows a doctor, please ask him/her and lets see if we can help
>   him out.
>
> Patrick, hope you're better very soon.
>
> --Michael
>

Here's to hoping he'll pull through. He seems to be doing better. Long
live Slackware.

 Hey folks (Score:5, Informative)
by volkerdi (9854) Alter Relationship on Tuesday November 16, @11:38AM
(#10833936)

I've been getting some mail over this, and most of it is positive stuff
that has me feeling better right now. Thanks. :-)

One thing I'd like to clear up is that I am not now, nor have I ever been
self-medicating with Cipro or any other antibiotics. I've always taken
them under the advice of and with a prescription from a qualified medical
doctor.

Again, I'm feeling better and hope it continues. Thanks for the well wishes!

Pat

-- 
--Matthew Sims
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to parse a string parse with ereg

2004-11-16 Thread Mark-Walter
Hi Jason Wong,

> > > The regular expression is already working but how can I reduce the
> > > string to have then only 2 lines ?
> > Convert the string into an array using explode().
 
Thank's a lot for this information. I tried this but
one thing is not suitable so far for me while
using explode.

E.g. if have the output of route -n:

xxx.x.x.x   0.0.0.0 255.255.255.255 UH 0  00 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U0  00 eth1
0.0.0.0 xxx.x.x.x 0.0.0.0 UG   0  00 ppp0

By using this example it's quite easy to analyze all
lines due to a correct syntax:

$INET_NUM = ereg_replace("[\ ]+([a-z]+)([0-9]{1})","\\1\\2_XrR",$INET_NUM);
$sorter = explode("_XrR",$INET_NUM);

But it has one weakness. In the case the device (ppp0) is 
missing somewhere in the output as the user didn't intend
to integrate this required information, and by having insight
it could be more than 10 lines with 10.000 rules of 
netfilter, explode will show concerning this example of 3
lines 2 defined arrays and it won't lead to an error as 
explode doesn't give a return value back which
has not been proofed to be exploded with _XrR. 
 
As I want to proof the syntax of all lines this is
wrong and not usable.
 
What I would need is a function which counts, based on a 
regular expression, how many times this shema occurs inside
of a string. So I can reduce the possibilty to have not an 
error and I could proof against the missing device by 
searching for 3 ip addresses followed by spaces and so on.

E.g. the above example of explode would show 2 set arrays
but with a regular expression which counts all ip addresses
and so on it would show 3 lines matching the construct. The
difference would lead then to an error message as the user
input was wrong.

-- 
Best Regards, Mark. 
"Hello, I am brand new to meditation, and I have a frustrating habit of falling 
asleep in class. I don't know how to stop this. When my teacher tells us to 
relax our bodies and focus on breathing, my body relaxes, but so does my brain."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] isset opposite

2004-11-16 Thread Dustin Krysak
Hi there.. I am pretty new to PHP, and I am familiar with php "isset" 
option now i was wondering (I have looked at the PHP site - but 
can not find it) how can you check if something is not set? I need to 
test if a $_GET is not set (not just empty).

thanks in advance!
d
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question on query string

2004-11-16 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



> -Original Message-
> From: Stuart Felenstein
> To: [EMAIL PROTECTED]
> Sent: 16/11/04 21:35
> Subject: Re: [PHP] Question on query string

> For searchresults.php (right below) is the way I'm
> grabbing everything:
> 
> $HTTP_GET_VARS['Ind'];

This does nothing.  Nada.  Zippo.  (Except waste time.)

What do you believe it does?

> // check any item is selected
> if (count($Ind) > 0 AND is_array($Ind)) {
> $s_Ind = "'".implode("','", $Ind)."'";
> }
> $HTTP_GET_VARS['State'];

Ditto.

> // check any item is selected
> if (count($State) > 0 AND is_array($State)) {
> $s_State = "'".implode("','", $State)."'";
> }
> $HTTP_GET_VARS['TType'];

Likewise.

> // check any item is selected
> if (count($TType) > 0 AND is_array($TType)) {
> $s_TType = "'".implode("','", $TType)."'";
> }
> 
> //Textfields / Dropdown
> $HTTP_GET_VARS['JTitle'];
> $HTTP_GET_VARS['City'];
> $HTTP_GET_VARS['Days']; 

And thrice ditto.

Cheers!

Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php.ini

2004-11-16 Thread Mailit, LLC
This is a similar question, but under Linux.
No matter how I change the upload_max_filesize in /etc/php.ini, the file 
uploading script refuses to accept files larger than 512 kB.
If I run the phpinfo() function, the new value for upload_max_size (20M) 
appears there, but I get the message  "File contains no data".
I repeated the test on another server running Linux, and I succeded in 
uploading a 6 MB file, by changing the value of upload_max_filesize.
My server must have some fundamental setting that overrides the php.ini 
settings. Can anyone clarify the matter?
Thanks. Mario.

Lester Caine wrote:
[EMAIL PROTECTED] wrote:
(on windows) can someone tell me where to define which php.ini gets 
used?

The default is a copy in the windows directory. (C:\WINDOWS or c:\WINNT)
While details of what goes IN php.ini are nice in the manual - where 
it goes is a bit more vague. Someone add some fine detail into 
relocating it?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] splitting string

2004-11-16 Thread Chris W. Parker
M. Sokolewicz 
on Tuesday, November 16, 2004 12:47 PM said:

>> Chris W. Parker wrote:
>> 
>>> Yes.
>>> 
>>> $string = "$string1|$string2|$string3|$string4|$string5";
>>> 
>>> 
>>> $string_back = explode("|", $string);
>>> 
> please explain...  WHY is that better?

Well it's better because it's a lot easier to read for one and two
because the pipe is a relatively safe delimiter. Kelly has a good idea
about using a tab (\t) instead, but if we want to get *really* crazy
let's use something like $#*$(#*@(*$@ as a delimiter. For sure that's
not going to be duplicated on accident. :)



Chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Auto-load class if it doesn't exists!

2004-11-16 Thread Rick Fletcher
is it possible to have a solution that works like an autoloader... for 
example:

$myclass = new class();
but if this class wasn't loaded yet, it loads by itself... egg:
if(class_exists(class))
{
 $myclass = new class();
}
else
{
 require_once(PATH_DIR.'class.class.php');
$myclass = new class();
}
PHP5 has a callback for just this purpose.
A special function named __autoload() is called whenever an attempt is 
made to instantiate an undeclared class.  The function should then 
define the needed class.

I've been using it for months without any issue.
I just did a search and was suprised to see it's missing from the docs 
at php.net.  It's mentioned on zend.com though: 
http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading19

--Rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] odbc fetch array issues

2004-11-16 Thread Jay Blanchard
[snip]
$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
 $result = odbc_exec($dbConnection, $sql);

while ($rows = odbc_fetch_array($result)) {   //This doesn't work with
odbc_fetch_object either
 print $rows->COLUMNNAME;
  }
[/snip]

For odbc_fetch_array you would have to use

print $rows['COLUMNNAME'];

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Patrick Volkerding Battles Mystery Illness

2004-11-16 Thread HMStudios
This:
http://slashdot.org/article.pl?sid=04/11/16/1846207
That sucks.
If anyone knows a doctor, please ask him/her and lets see if we can help 
 him out.

Patrick, hope you're better very soon.
--Michael
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Object oriented programming

2004-11-16 Thread Pedro Irán Méndez Pérez
Hello my friends, how can I get a tutorial or book about Object Oriented
Programming (OOP) in PHP, if is posible about PHP 5, I am beginning in use
PEAR, and almost librarys are in OOP. Can you help me?

Thanks :)

 =
"¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo
de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti"

Isa 40:27
 =

Atte   Pedro Irán Méndez Pérez

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] bubble sort crashing apache

2004-11-16 Thread Jay Blanchard
[snip]
crashing apache
[/snip]

Apache list maybe? And what, exactly, do you mean by crashing Apache?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] splitting string

2004-11-16 Thread Mike
Pipes are also good visual delimiters - so if you're reading through output
or looking in your raw data, I find that by scanning for pipes is a lot
easier visually than other sorts of delimiters. I've sometimes used two or
three pipes in a row just to make sure I don't have someone entering a
single pipe to screw up the code or to just make it that much easier to find
in large strings of text.

-M

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 16, 2004 4:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] splitting string

M. Sokolewicz wrote:
> please explain...  WHY is that better?

For me, I'll use pipes because they are so rarely used (if ever) when an 
user is entering text.  If I make my delimiter a newline (or comma, 
etc.), and an end user enters one with whatever they're inputting, it 
will screw up my split.

-- 
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Jeff - Webmaster
Thank you for the response Brent. I made that change and the problem still 
exists. I ran the page through the validator and it found some generic 
problems, but nothing that seemed like it would relate here.

Jeff
At 01:19 PM 11/16/2004, Brent Baisley wrote:
I never had a problem with a Mac, nor any platform as long as I adhered to 
web standards. OK, so IE can be problematic especially with CSS.

Anyway, I notice that your input field doesn't have a value="" attribute. 
That may be your problem. I'm pretty sure it's a required attribute. IE is 
extremely forgiving of bad HTML, something MS actually bragged about recently.

You should run your web page through one of the validators on the 
internet. It will tell every little thing that is wrong with your html.
http://validator.w3.org/

On Nov 16, 2004, at 3:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users can 
go a fill out a simple form and submit it to our support department using 
the post method. For users on PC's, this works flawlessly. I am getting 
complaints from people who use Macintosh who say that they are not able 
to type in certain fields. The fields in question are text boxes. There 
is not anything special about the code (snippet at the end of this 
email). They are hitting the issue using Safari, Netscape, or IE and with 
varying versions of each. Has anyone out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the 
conditions above
I do not agree with the 
conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] splitting string

2004-11-16 Thread Kelly Hallman
Nov 16 at 12:00pm, Chris W. Parker wrote:
> > Also, is there actially better way to do this then adding \n between
> > strings? (e.g. store form fields name, address, city, state, zip,
> > phone, email as a one string in db and later pull them from DB and
> > split them back?)
> 
> Yes.
> $string = "$string1|$string2|$string3|$string4|$string5";
> $string_back = explode("|", $string);

I think tabs are a better delimiter since they can't really be input into
a text field in a typical form/browser, and they have even less relevance
to most text input. (I can't think of why a pipe would be there either,
but it would be easy to type one in, even on accident, therefore you'd
need to sanitize the input to assure you didn't have unexpected
delimiters; probably should anyway regardless of delimiter).

Also, remember list() when unpacking an array to variables:
list($address, $city, $state, $zip, $country) = explode("\t", $input);

I agree, however, that this is an undesirable way to store data in an 
RDBMS. Still, it's better than serializing and unserializing... :)

On that note, I think this should only be used for data that is NEVER
intended to be queried, but may be usefully extracted on SELECTed records. 
And we know the wisdom of assuming something will NEVER be necessary! :)

-- 
Kelly Hallman
// Ultrafancy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread Afan Pasalic
Jason Wong wrote:
You're not using your database like it should be used. Each invidually 
identifiable item should be stored in a separate column. Lumping everything 
into one column makes it harder to extract and process data. Google for 
"normalise table tutorial", or "normalize table tutorial" if you want things 
from a mainly American point of view.

I mentioned Name, Address, City, ... just as example.
In my case, I use really just for ONE string that has to be written in 
several lines. I collect these lines separate, but, since the are one 
thing I put them together as one string (from now, using pipe to 
separate them). I really don't think I should use any of three 
normalization processes. Or, even as American, I am wrong? :)

-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: unable to upload a directory using the web brower (HTTP).

2004-11-16 Thread Scott Fletcher
I like the Rad Upload from the link you provided and it work pretty well.  I
like it and I'm going to buy it.  There's a lot of ease of use which is a
good sign.  It even accept the non-certificate-authority ssl certificate as
well as the certificate expiration.  A few others won't and stopped working,
that I don't like.  Well, I'm building a website on the test machine, so the
java applet have to work before it goes live.  Thanks for that wonderful
link

Thanks,
 Scott

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks for the info, will check it out.  I also saw one at
> http://www.javazoom.net/applets/jclientupload/jclientupload.html and it
cost
> some money.  But I did the trial download to see if it is flexible enough
> for me and I found that it is not.  So, I'm thinking that I might not find
> one and might would have to write one from scratch.
>
> Scott
>
> "Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Scott Fletcher wrote:
> >
> > >Um, can't be done.  So, I'll have to use JAVA instead.  Have anyone
ever
> > >done this, does anyone know of a good freeware JAVA applet that I can
> use?
> > >
> > >
> > Shameless Plug: Rad Upload (http://www.radinks.com/upload) does upload
> > folders over HTTP unfortunatley it's not free (but still cheap).
> >
> >
> > >Thanks,
> > > Scott
> > >
> > >"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> > >news:[EMAIL PROTECTED]
> > >
> > >
> > >>I found that on most web browsers, I can not upload the folder via
HTTP
> > >>using hte web browser upload dialog box.  So, I can't use the php's
> > >>function, is_uploaded_file and move_uploaded_file.  Because the web
> > >>
> > >>
> > >browser
> > >
> > >
> > >>see the folder as something to open with, like going down one
directory.
> > >>So, any advice or suggestion??
> > >>
> > >>Thanks,
> > >> Scott
> > >>
> > >>
> > >
> > >
> > >
> >
> >
> > -- 
> > Raditha Dissanayake.
> > --
> > http://www.radinks.com/print/card-designer/ | Card Designer Applet
> > http://www.radinks.com/upload/  | Drag and Drop Upload

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Jeff - Webmaster
Hello all. I have created a few PHP pages on our website where users can go 
a fill out a simple form and submit it to our support department using the 
post method. For users on PC's, this works flawlessly. I am getting 
complaints from people who use Macintosh who say that they are not able to 
type in certain fields. The fields in question are text boxes. There is not 
anything special about the code (snippet at the end of this email). They 
are hitting the issue using Safari, Netscape, or IE and with varying 
versions of each. Has anyone out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the conditions 
above
I do not agree with the 
conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] my own extension

2004-11-16 Thread Uffe Kousgaard
"Klaus Reimer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> But you know your library and you have it under control so maybe it's
> easier to write C include files to interface your Kylix library from C
> instead of writing Delphi-Units to interface PHP from Kylix.
>
> So I would try to first implement a C interface (or C++ if it has OO)
> for your Delphi library and then write a simple PHP extension which
uses
> this C/C++ interface to use your delphi lib.

It may is in fact a C type layer I have in mind, i.e. a "flattening" of
the Delphi classes. Will check it out.

Regards
Uffe

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread Afan Pasalic

Chris W. Parker wrote:
Yes.
$string = "$string1|$string2|$string3|$string4|$string5";
$string_back = explode("|", $string);
Ok, I'm going to change the code and use pipes
:)
Thanks to all of you.!
-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] splitting string

2004-11-16 Thread Philip Thompson
On Nov 16, 2004, at 2:46 PM, M. Sokolewicz wrote:
Afan Pasalic wrote:
Chris W. Parker wrote:
Yes.
$string = "$string1|$string2|$string3|$string4|$string5";
$string_back = explode("|", $string);
Ok, I'm going to change the code and use pipes
:)
Thanks to all of you.!
-afan
please explain...  WHY is that better?
[a bit of sarcasm, but somewhat true]
That's easy. | is only 1 character and \n is 2! Newlines are also used 
everywhere - pipe occurs less often.
[/a bit of sarcasm, but somewhat true]

Just a thought,
~Philip
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] odbc fetch array issues

2004-11-16 Thread Adil
Hey people,

Anyone know much about odbc_fetch_array() or odbc_fetch_object() functions
in php.  My while loop keeps breaking while using this function.  I'm trying
to grab a row from the result returned by the database query and for testing
purposes, just printing out each item in the row as follows:

$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
 $result = odbc_exec($dbConnection, $sql);

while ($rows = odbc_fetch_array($result)) {   //This doesn't work with
odbc_fetch_object either
 print $rows->COLUMNNAME;
  }


I get nothing at all which I find pretty strange so I wanted to know if
there were any bugs with this function, maye while working on IIS or just
problems with the functions themselves.

Thx again
Adil.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Jeff - Webmaster
https://www.shoppingnw.com/ccare/auto_bill.php
Thanks
Jeff
At 01:12 PM 11/16/2004, Jonel Rienton wrote:
do you have the actual link of this page, i can test it for you.
--
I not know English well, but I know 7 computer languages.
anonymous
On Nov 16, 2004, at 2:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users can 
go a fill out a simple form and submit it to our support department using 
the post method. For users on PC's, this works flawlessly. I am getting 
complaints from people who use Macintosh who say that they are not able 
to type in certain fields. The fields in question are text boxes. There 
is not anything special about the code (snippet at the end of this 
email). They are hitting the issue using Safari, Netscape, or IE and with 
varying versions of each. Has anyone out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the 
conditions above
I do not agree with the 
conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein
--- Jason Wong <[EMAIL PROTECTED]> wrote:
 
> When you're building a query string then (in
> general) there is no need for 
> urldecode(). On the contrary you want to use
> urlencode(), this is done on the 
> *value* of the individual parameters.
> 
> And about this:  $_POST["Ind[]"], it's obvious you
> haven't absorbed what I 
> said about this particular construct. Please re-read
> my previous post 
> regarding this and try to understand it.

> If the URL on the searchpage was constructed
> properly then on 
> searchresults.php the values passed can be read from
> $_GET directly with no 
> further processing (ie no need for urldecode() and
> other such nonsese) on 
> your part. But remember, you still need to validate
> the data you get from 
> $_GET (and in general from $_POST etc) before you
> use them.
> 
Sorry, for some reason my email is out of synch today.
First the searchresults.php is reading the values
properly.  The queries are running correct-all fields.
 I'm still printing out the sql statement and those
are  without the hex values.

The method is $_GET , search.php is nothing more then
some form elements and fields.  
For searchresults.php (right below) is the way I'm
grabbing everything:

$HTTP_GET_VARS['Ind'];
// check any item is selected
if (count($Ind) > 0 AND is_array($Ind)) {
$s_Ind = "'".implode("','", $Ind)."'";
}
$HTTP_GET_VARS['State'];
// check any item is selected
if (count($State) > 0 AND is_array($State)) {
$s_State = "'".implode("','", $State)."'";
}
$HTTP_GET_VARS['TType'];
// check any item is selected
if (count($TType) > 0 AND is_array($TType)) {
$s_TType = "'".implode("','", $TType)."'";
}

//Textfields / Dropdown
$HTTP_GET_VARS['JTitle'];
$HTTP_GET_VARS['City'];
$HTTP_GET_VARS['Days']; 

I'm not seeing what is incorrect. I did try 
$HTTP_GET_VARS['Ind'] = urldecode('Ind'); (in
searchresults.php) but of course it wasn't imploded
yet.  I don't want to confuse this question or myself
(or anyone) , but maybe I should do the implodes on
search.php ?

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] bubble sort crashing apache

2004-11-16 Thread Josh Howe

I've implemented my own bubble sort function that is crashing apache.
Can somebody either help me out with the bubble sort or help me figure
out a way to solve my problem with php's built in sorting functions?

This is my problem. I'm writing my own class for displaying html tables.
Right now, the only thing this class really abstracts is the sorting of
the table rows by any column ascending or descending. My table class
accepts an array of $row objects. Each $row object itself contains an
array of $cell objects. I've included the function I'm using to sort the
rows at the end of the email.

The problem I'm seeing is that after about the 3rd sort on a particular
column, apache crashes. Maybe bubble sort isn't the best sorting
algorithm, since when the user switches from ascending to descending
sort order on the same column or vice versa, I get the worst case
scenario for a bubble sort (the data is in reverse order). 

Any ideas? Thanks!!



private function sort() {
$col_name = $this->order_by;

/*
** Get the column number of the column we're
** ordering by.
*/
for ($i = 0; $i < count($this->col_names); $i++) {
if (strtoupper($col_name) ==
strtoupper($this->col_names[$i])) {
$col_num = $i;
break;
}   
}

/*
** bubble sort
*/  
for ($n = 0; $n < count($this->contents); $n++) {
$sorted = true;

for ($y = 0; $y < count($this->contents) - 1; $y++) {
$cell_arr_this =
$this->contents[$y]->get_cell_arr();
$cell_arr_next = $this->contents[$y +
1]->get_cell_arr();

if
($this->out_of_order($cell_arr_this[$col_num],$cell_arr_next[$col_num]))
{
$tmp_row = $this->contents[$y];
$this->contents[$y] = $this->contents[$y
+ 1];
$this->contents[$y + 1] = $tmp_row;

$sorted = false;
}
}

if ($sorted) break;
}
}

function out_of_order($val1, $val2) {
if ($this->order_dir == "desc") {
if ($val2 > $val1)
return true;
else 
return false;
} else {
if ($val1 > $val2)
return true;
else 
return false;
}
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] splitting string

2004-11-16 Thread Chris W. Parker
Afan Pasalic 
on Tuesday, November 16, 2004 10:01 AM said:

> I  create a string from other strings:
> $string =
> $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5; and
> then store it in DB. 

[snip]

> Also, is there actially better way to do this then adding \n between
> strings?
> (e.g. store form fields name, address, city, state, zip, phone, email
> as a one string in db and later pull them from DB and split them
> back?)

Yes.

$string = "$string1|$string2|$string3|$string4|$string5";


$string_back = explode("|", $string);

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread John Nichel
M. Sokolewicz wrote:
please explain...  WHY is that better?
For me, I'll use pipes because they are so rarely used (if ever) when an 
user is entering text.  If I make my delimiter a newline (or comma, 
etc.), and an end user enters one with whatever they're inputting, it 
will screw up my split.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] splitting string

2004-11-16 Thread Dennis Lahay
Remember, working code is better than pretty code, on any day.
If you have a system that you understand and it works (without 
excessively slowing the system down or grinding it to a halt), then 
stick with it. Over time you'll learn better ways of doing things. But, 
your first goal should be getting it to work and getting your desired 
output, even though you may be doing it the "hard way."


On Nov 16, 2004, at 2:26 PM, Afan Pasalic wrote:
Jason Wong wrote:
You're not using your database like it should be used. Each 
invidually identifiable item should be stored in a separate column. 
Lumping everything into one column makes it harder to extract and 
process data. Google for "normalise table tutorial", or "normalize 
table tutorial" if you want things from a mainly American point of 
view.

I mentioned Name, Address, City, ... just as example.
In my case, I use really just for ONE string that has to be written in 
several lines. I collect these lines separate, but, since the are one 
thing I put them together as one string (from now, using pipe to 
separate them). I really don't think I should use any of three 
normalization processes. Or, even as American, I am wrong? :)

-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is Perl faster than PHP?

2004-11-16 Thread Brad Pauly
On Tue, 16 Nov 2004 16:54:22 +0100, Merlin <[EMAIL PROTECTED]> wrote:
> Hi there,
> 
> it came to my attention that most of the high traffic portals are using perl 
> in
> the backend. Those sites do also apear to me to be very fast in comparison to
> most php sites. Are there any known performance comperissons between the two
> available? Or can one say that PHP or Perl is faster about x percent in 
> general
> compared to the other one?

I don't know of any comparisons, but even if they exist, unless they
are very detailed about the kind of application that they built and
tested, I would be skeptical about drawing a meaningful conclusion.
The reason being that it is very difficult (impossible?) to say that
one language is faster than another when comparing applications
written in those languages. The speed of a high traffic site is more
dependent on where each application runs into a bottleneck and how
that is or isn't solved. Sometimes the bottleneck has nothing to do
with the application, but the network it is running on or something
else.

There are too many variables that affect the speed of a site to say
one language is faster than the other. Both languages can be used to
write fast, high traffic sites.

Brad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Brent Baisley
I never had a problem with a Mac, nor any platform as long as I adhered 
to web standards. OK, so IE can be problematic especially with CSS.

Anyway, I notice that your input field doesn't have a value="" 
attribute. That may be your problem. I'm pretty sure it's a required 
attribute. IE is extremely forgiving of bad HTML, something MS actually 
bragged about recently.

You should run your web page through one of the validators on the 
internet. It will tell every little thing that is wrong with your html.
http://validator.w3.org/

On Nov 16, 2004, at 3:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users 
can go a fill out a simple form and submit it to our support 
department using the post method. For users on PC's, this works 
flawlessly. I am getting complaints from people who use Macintosh who 
say that they are not able to type in certain fields. The fields in 
question are text boxes. There is not anything special about the code 
(snippet at the end of this email). They are hitting the issue using 
Safari, Netscape, or IE and with varying versions of each. Has anyone 
out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the 
conditions above
I do not agree with 
the conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] splitting string

2004-11-16 Thread Brent Baisley
The problem is that you are using single quotes, so php is looking for 
a literal \n rather than escaping it to a new line character. Try 
double quotes and then PHP will parse the contents of the quotes, 
looking for escape characters and  variables.
explode("\n")

Use nl2br() to convert new lines to .
On Nov 16, 2004, at 1:01 PM, Afan Pasalic wrote:
I  create a string from other strings:
$string = 
$string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
and then store it in DB.

But, I can't figure out how to split them back?
Tried:
$string_back = explode('\n', $string);
$string_back = explode('', $string);
$string_back = explode('', $string);
Anu help?
Also, is there actially better way to do this then adding \n between 
strings?
(e.g. store form fields name, address, city, state, zip, phone, email 
as a one string in db and later pull them from DB and split them 
back?)

Thanks for any help!
-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem typing in PHP forms on Mac OS

2004-11-16 Thread Jonel Rienton
do you have the actual link of this page, i can test it for you.
--
I not know English well, but I know 7 computer languages.
anonymous
On Nov 16, 2004, at 2:24 PM, Jeff - Webmaster wrote:
Hello all. I have created a few PHP pages on our website where users 
can go a fill out a simple form and submit it to our support 
department using the post method. For users on PC's, this works 
flawlessly. I am getting complaints from people who use Macintosh who 
say that they are not able to type in certain fields. The fields in 
question are text boxes. There is not anything special about the code 
(snippet at the end of this email). They are hitting the issue using 
Safari, Netscape, or IE and with varying versions of each. Has anyone 
out there run into this before?

Thanks
Jeff


#condensed#

Billing Address


#condensed#
I agree to the 
conditions above
I do not agree with 
the conditions above




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: http header script to stimluate upload with drag and drop??

2004-11-16 Thread Scott Fletcher
I have written lot of http header scripts myself, so I'm familiar with what
they are used for.

Scott

"M. Sokolewicz" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Scott Fletcher wrote:
> > Hi!
> >
> > I wonder is is it possible to have an http header that would
stimluate
> headers don't "stimulate". They are simple "messages", a bit of text
> with no real meaning until the browser/server/whatever gives it meaning
> locally to itself.
>
> > files/folders upload via dragging over to the browser window?
> No.
>If so then
> > what are the sample functions or scripts that make this possible...
> headers, functions and script don't have much to do with eachother. I
> would suggest reading some documentation about headers to actually
> understand what you're talking about.
>
> Please don't take that wrong, I'm not trying to offend you, but I really
> think you should at least educate yourself about such things a bit
> before asking.
> >
> > Thanks,
> >  Scott

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header script to stimluate upload with drag anddrop??

2004-11-16 Thread Scott Fletcher
:-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] odbc question

2004-11-16 Thread Adil
>$sql = "SELECT * FROM users WHERE username='$username' AND
password='$password'";
>$result = odbc_exec($dbConnection, $sql);
>
>while ($rows = odbc_fetch_array($result)) {
> //This doesn't work with odbc_fetch_object either
> print $rows->COLUMNNAME;
>}

It's returning an array, not an object (I can't speak as to how the
odbc_fetch_object function behaves - it seems poorly documented, but it
looks like you get back something more fancy than a simple object with
named variables).

In short, use odbc_fetch_array and refer to the items as
$rows["COLUMNNAME"] (or use single quotes).


- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread Afan Pasalic
That was the trick?
At least - I was close :)
Thanks!
-afan
Klaus Reimer wrote:
Afan Pasalic wrote:
But, I can't figure out how to split them back?
$string_back = explode('\n', $string);

That one is the right one. But you must use double quotes, not single 
quotes. Escaped characters (except \') in single quoted strings are 
not processed.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] splitting string

2004-11-16 Thread Klaus Reimer
Afan Pasalic wrote:
But, I can't figure out how to split them back?
$string_back = explode('\n', $string);
That one is the right one. But you must use double quotes, not single 
quotes. Escaped characters (except \') in single quoted strings are not 
processed.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php.ini

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 01:33, [EMAIL PROTECTED] wrote:
> thanks for the replies, but...
>
> > If there is a php.ini file in the php root directory, then that gets
>
> used. Otherwise, the php.ini file in C:\Windows (iirc).  If the
>
> Actually it seems like the Zend IDE installed another apache server. But
> the situation is more confusing.

phpinfo() will tell you exactly where that particular installation of PHP 
expects its php.ini file to be found.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
BOFH Excuse #287:

Telecommunications is downshifting.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread M. Sokolewicz
Afan Pasalic wrote:

Chris W. Parker wrote:
Yes.
$string = "$string1|$string2|$string3|$string4|$string5";
$string_back = explode("|", $string);
Ok, I'm going to change the code and use pipes
:)
Thanks to all of you.!
-afan
please explain...  WHY is that better?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] http header script to stimluate upload with drag and drop??

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 13:10 -0500, Scott Fletcher wrote:
> Hi!
> 
> I wonder is is it possible to have an http header that would stimluate
> files/folders upload via dragging over to the browser window?  If so then
> what are the sample functions or scripts that make this possible...
> 
> Thanks,
>  Scott
> 

I have a script that will stimulate you.

;-)

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] splitting string

2004-11-16 Thread Dennis Lahay
I usually put a bar "|" between each string, if I need to.
$string = $string1."|".$string2."|".$string3."|".$string4."|".$string5;
D
On Nov 16, 2004, at 12:01 PM, Afan Pasalic wrote:
I  create a string from other strings:
$string = 
$string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
and then store it in DB.

But, I can't figure out how to split them back?
Tried:
$string_back = explode('\n', $string);
$string_back = explode('', $string);
$string_back = explode('', $string);
Anu help?
Also, is there actially better way to do this then adding \n between 
strings?
(e.g. store form fields name, address, city, state, zip, phone, email 
as a one string in db and later pull them from DB and split them 
back?)

Thanks for any help!
-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] splitting string

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 02:01, Afan Pasalic wrote:

> I  create a string from other strings:
> $string = $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
> and then store it in DB.
>
> But, I can't figure out how to split them back?
>
> Tried:
> $string_back = explode('\n', $string);

Notice that you used "\n" when creating $string? Do the same here.

> Also, is there actially better way to do this then adding \n between
> strings?
> (e.g. store form fields name, address, city, state, zip, phone, email as
> a one string in db and later pull them from DB and split them back?)

You're not using your database like it should be used. Each invidually 
identifiable item should be stored in a separate column. Lumping everything 
into one column makes it harder to extract and process data. Google for 
"normalise table tutorial", or "normalize table tutorial" if you want things 
from a mainly American point of view.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You carve wounds upon my flesh and write there in salt!

  -- Fremen Lament
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini

2004-11-16 Thread lister
thanks for the replies, but...

> If there is a php.ini file in the php root directory, then that gets
used. Otherwise, the php.ini file in C:\Windows (iirc).  If the

Actually it seems like the Zend IDE installed another apache server. But
the situation is more confusing.

When I start my standard apache server (dbl-click the binary itself to
make sure no windows services are redirecting), it is not looking for a
php.ini in the same folder as the binary. It reads in
C:/dev/Zend/etc/php.ini

I think I tracked down the issue to setting which httpd.conf apache looks
for. the directory setup is:

apache/
   /conf/httpd.conf

but this file seems to not be getting used, rather it is using the other
apache install...

1 apache binary
  2 looks for an httpd.conf (search order?)
3 which has a line where to load a php.dll
  4 php.ini is looked for next to the php.dll
 5 php.ini says where to find other php extensions etc.

so somewhere tween 1 and 2 there is a redirect i cannot track down.

i guess its not really a PHP issue, more an apache/zend IDE installer
thing but appreciate any tips...

/dc


>
>> On my dev box, I installed the zend editor. Now when i do a
>>   localhost/phpinfo()
>> from a normal browser window (ie not from within the zend IDE) it says php
>> is using the <..>/zend/php.ini settings file...
>
> This is because that's the file that it found first (ie, search order).
Zend installs its own php binaries (unless you do a custom setup).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] splitting string

2004-11-16 Thread Greg Donald
On Tue, 16 Nov 2004 12:01:04 -0600, Afan Pasalic <[EMAIL PROTECTED]> wrote:
> I  create a string from other strings:
> $string = $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
> and then store it in DB.
> 
> But, I can't figure out how to split them back?
> 
> Tried:
> $string_back = explode('\n', $string);

Double quotes will cause the value to be evaluated as a newline
character.  The single quotes will not.  Use "\n" instead like you did
when you made the string.

> Also, is there actially better way to do this then adding \n between
> strings?

You can use whatever works.  I use the pipe | character, it's pretty
standard and I've never seen it used as anything except a delimiter.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: splitting string

2004-11-16 Thread M. Sokolewicz
Afan Pasalic wrote:
I  create a string from other strings:
$string = $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
and then store it in DB.
But, I can't figure out how to split them back?
Tried:
$string_back = explode('\n', $string);
$string_back = explode('', $string);
$string_back = explode('', $string);
Anu help?
Also, is there actially better way to do this then adding \n between 
strings?
(e.g. store form fields name, address, city, state, zip, phone, email as 
a one string in db and later pull them from DB and split them back?)

Thanks for any help!
-afan
use "\n" instead of '\n'. Special characters and variables between 
single quotes aren't replaced with their ACTUAL meanings, while they are 
when the text is between DOUBLE quotes. So, using "\n" you get a NewLine 
character; using '\n' you will get the raw text '\n' (no quotes)

- Tul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: http header script to stimluate upload with drag and drop??

2004-11-16 Thread M. Sokolewicz
Scott Fletcher wrote:
Hi!
I wonder is is it possible to have an http header that would stimluate
headers don't "stimulate". They are simple "messages", a bit of text 
with no real meaning until the browser/server/whatever gives it meaning 
locally to itself.

files/folders upload via dragging over to the browser window?
No.
  If so then
what are the sample functions or scripts that make this possible...
headers, functions and script don't have much to do with eachother. I 
would suggest reading some documentation about headers to actually 
understand what you're talking about.

Please don't take that wrong, I'm not trying to offend you, but I really 
think you should at least educate yourself about such things a bit 
before asking.
Thanks,
 Scott
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Auto-load class if it doesn't exists!

2004-11-16 Thread Jonel Rienton
Hi,
you would need something like a singleton class if my memory serves me.
cheers,
jonel
--
I not know English well, but I know 7 computer languages.
anonymous
On Nov 16, 2004, at 11:36 AM, Bruno B B Magalhães wrote:
Hi people,
is it possible to have a solution that works like an autoloader... for 
example:

$myclass = new class();
but if this class wasn't loaded yet, it loads by itself... egg:
if(class_exists(class))
{
 $myclass = new class();
}
else
{
 require_once(PATH_DIR.'class.class.php');
$myclass = new class();
}
Regards,
Bruno B B Magalhaes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question on query string

2004-11-16 Thread Stuart Felenstein

--- "Ford, Mike" <[EMAIL PROTECTED]> wrote:
 
> The main problem with the above snippet that I can
> see is that there's very
> unlikely to be such a thing as $_POST["Ind[]"] --
> form fields with
> name="Ind[]" will turn up as an array in
> $_POST["Ind"] ($_POST["Ind"][0],
> $_POST["Ind"][1], etc.).  But the whole snippet
> looks very odd -- why are
> you trying to pass POSTed values as GET variables on
> (I presume) a form
> action??  Can you post a little context to the list
> to give us some idea
> what you're really trying to do.

Mike - 
Not sure what context would be useful.  The form
action is set to $_GET method.  I should have noticed
POST in there but set those urldecodes via Dreamweaver
bindings.  If you know what those are. Originally the
form was $_POST.  Now -  method="get"  
The search.php form really does nothing with the
arrays.  In searchresults.php I am grabbing the
variables like this:

$HTTP_GET_VARS['Ind']
if (count($Ind) > 0 AND is_array($Ind)) {
$s_Ind = "'".implode("','", $Ind)."'";

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Authentication Class

2004-11-16 Thread Bruno B B Magalhães
Is this good or bad? heheh!
Regards,
Bruno B B Magalhaes
On Nov 16, 2004, at 3:31 PM, raditha dissanayake wrote:
Bruno B B Magalhães wrote:
Hi guys,
well, I wrote a class for a big project (a framework), and here it 
is,  I was wondering if someone have any suggestions regarding 
flexibility  and security.
Wow it's the most artistic piece of php i have ever seen.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is Perl faster than PHP?

2004-11-16 Thread Brent Baisley
Since both Perl and PHP are scripting languages, I don't think you 
could definitively say one is faster than the other. First and foremost 
it's the talent of the coder that makes a program fast or slow. Perl 
has been around a lot longer and so the libraries (i.e. CPAN) are more 
refined and optimized. For instance, I would say Perl DBI is faster at 
accessing databases than PHP's PEAR.  You don't have to use PEAR if you 
find the overhead too much. And you don't have to use DBI, but DBI is 
so mature I don't know why you wouldn't want to. You could also get 
"compilers" for both languages to speed up your site.

I've seen some really slow Perl sites and some really slow PHP sites. 
The learning curve for PHP is far easier than that for Perl, so you 
probably have many more people using PHP for their sites that aren't 
really that good at scripting. And how many of those slow PHP sites 
were generated from Dreamweaver? If you did extensive tests, I would 
say Perl would probably come out ahead. But that doesn't mean you can't 
create a PHP site that is really fast.

Sorry, I know I didn't answer your question.
On Nov 16, 2004, at 10:54 AM, Merlin wrote:
Hi there,
it came to my attention that most of the high traffic portals are 
using perl in the backend. Those sites do also apear to me to be very 
fast in comparison to most php sites. Are there any known performance 
comperissons between the two available? Or can one say that PHP or 
Perl is faster about x percent in general compared to the other one?

thanx for any hint,
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] link in ModalDialog

2004-11-16 Thread vlad georgescu
first of all thanks for response.

and second, some clarification. i have a main window (with a txtarea -
html-editor), from this page I want to open a little page
(upload_img.php) to handle the uploadimg2-onserver and return
path2img-onserver (where was uploaded) on close.

showModalDialog in js open a page in modal mode (on top). this type of
window can return a value (the parent is waiting until child is
closed), but, as I telling you, any link/redirect in modal window
opens a new one instead of opening in the same window. due to this I
can't use POST in upload_img.php.

the solution was in using a non-modal window for upload_img.php, and
returning result with js opener reference
(opener.document.forms[0].htmled.value+= "";)

regards,


On Mon, 15 Nov 2004 13:38:27 -0500, Gryffyn, Trevor
<[EMAIL PROTECTED]> wrote:
> I didn't see an answer to this, so thought I'd drop you a note.
> 
> I've never used the "showModalDialog" function in JS..  Is it something
> built into JS or is it some other function that does a window.open or
> something like that?
> 
> Anyway, a "modal" dialog box in regular programming terms is a window
> that'll open in addition to the regular application window and not allow
> you to interact with the parent window until the modal dialog is closed.
> 
> Try opening a "File.." dialog box in any Windows application and you get
> an idea of what I'm talking about.  You can't do anything with that app
> until you close that "File..." dialog box.
> 
> Now, I'm not quite sure what you're asking here but it sounds like your
> process is happening like this:
> 
> 1. You have a main window with whatever HTML or PHP script or whatever
> in it.  In this window, you have an "upload" button or something.
> 
> 2. You click on the "upload" button or link (or maybe this happens
> onLoad or something) and a new window opens with upload_img.php in it.
> This handles the file selection and/or the whole upload itself, pasting
> some kind of data either in this window or in the parent window (not
> quite clear on that).
> 
> 3. You're trying to go to another link fro mthe upload_img.php modal
> window and it's opening yet another (third) window.
> 
> Couple of things to think about:
> 
> 1. Do you want the upload_img.php in the main window or in a little side
> popup window?
> 
> 2. Do you want the popup window to close and return to the main window
> when it's done the upload?
> 
> 3. Do you want the popup window to stay while you do other stuff?
> 
> 4. Do you want links clicked on in the popup window to display within
> the popup or in the main window?
> 
> In Javascript as well as in normal HTML, there's the concept of the
> "parent" window.   In HTML, you can do:
> 
> Some link
> 
> Then from the new page that's opened, do:
> 
> Link to open in parent
> window
> 
> Something like that (my syntax may be a little off.. I don't use parent
> a lot).
> 
> There are similar functions in Javascript.   You can also name windows
> and use them as the target:
> 
> Some link to show in
> popup
> 
> Some link to show in main
> window
> 
> The first one, target "popup-window" will open a new window if one named
> "popup-window" doesn't exist.  The second one will also open a new
> window if you havn't used Javascript to name the current window or used
> a target = "main-window" already.  But then as long as that window stays
> open, any targets pointing to "main-window" will go there.
> 
> In the past, when I've used popups with javascript, it's happened like
> this:
> 
> 1. Main window has a link that creates popup using JS and window.open or
> whatever it is... Usually without scroll bars, with a specific window
> size, etc.
> 
> 2. The popup window does some kind of thing and once it's done, has a
> "close window" option.  The close window option runs another JS that
> refreshes the "parent" window to reflect the changes made in the popup
> window.  This is usually done by sending it parameters in the URL (and
> retrieved via a $_GET variable) or with a general refresh with no
> parameters and it gets the query parameters from session variables.
> 
> The variables are usually something like what page in a long listing
> you're on Or whate query you did to get the information displayed.
> Like I did an online catalog for a very large country store.  You might
> do a query for "show me all jellies, jams and preserves", then with 20
> listed per page, on the 5th page, you edit the price of one of them.  Or
> the inventory quantity or the description or something.  Once you're
> done doing that in the popup, it says "Done!  Click to close window",
> then either via the URL or via session variables, tells the parent
> window to display Jellies/Jams/Preserves, 20 items per page, 5th page.
> If you do a delete and there might not be 5 pages anymore, you might
> want to do "If requesting page 5.. And only 4 pages are found.. Make it
> page 4 instead" or just go back to page 1.  Otherwise, you might get a
> blank 

RE: [PHP] Question on query string

2004-11-16 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 16 November 2004 16:28, Stuart Felenstein wrote:

> --- Richard Davey <[EMAIL PROTECTED]> wrote:
> 
> 
> > Use urldecode() to get them back to "normal" again.
> 
> Changed the form action line to this:
> 
> action="searchresults.php?Ind= urldecode(((isset($_POST["Ind[]"]))?$_POST["Ind[]"]:""))
> 
> 
> Still getting this:
> 
> ?Ind%5B%5D=1&Ind%5B%5D=2&Ind%5B%5D=3
> 
> I'm under the assumption the values get passed from
> search.php using urldecode() to searchresults.php.
> Maybe that is not the case.

URL encoding and decoding is done completely outwith PHP in this case -- the
encoding to %xx is done by the browser, and automatically decoded by the Web
server on the way through to PHP.  You should never see the %xx versions in
your script, and will have no need of urldecode().

The main problem with the above snippet that I can see is that there's very
unlikely to be such a thing as $_POST["Ind[]"] -- form fields with
name="Ind[]" will turn up as an array in $_POST["Ind"] ($_POST["Ind"][0],
$_POST["Ind"][1], etc.).  But the whole snippet looks very odd -- why are
you trying to pass POSTed values as GET variables on (I presume) a form
action??  Can you post a little context to the list to give us some idea
what you're really trying to do.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] http header script to stimluate upload with drag and drop??

2004-11-16 Thread Scott Fletcher
Hi!

I wonder is is it possible to have an http header that would stimluate
files/folders upload via dragging over to the browser window?  If so then
what are the sample functions or scripts that make this possible...

Thanks,
 Scott

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] splitting string

2004-11-16 Thread Afan Pasalic
I  create a string from other strings:
$string = $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5;
and then store it in DB.
But, I can't figure out how to split them back?
Tried:
$string_back = explode('\n', $string);
$string_back = explode('', $string);
$string_back = explode('', $string);
Anu help?
Also, is there actially better way to do this then adding \n between 
strings?
(e.g. store form fields name, address, city, state, zip, phone, email as 
a one string in db and later pull them from DB and split them back?)

Thanks for any help!
-afan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Question on query string

2004-11-16 Thread Jason Wong
On Wednesday 17 November 2004 00:28, Stuart Felenstein wrote:
> --- Richard Davey <[EMAIL PROTECTED]> wrote:
> > Use urldecode() to get them back to "normal" again.
>
> Changed the form action line to this:
>
> action="searchresults.php?Ind= urldecode(((isset($_POST["Ind[]"]))?$_POST["Ind[]"]:""))

When you're building a query string then (in general) there is no need for 
urldecode(). On the contrary you want to use urlencode(), this is done on the 
*value* of the individual parameters.

And about this:  $_POST["Ind[]"], it's obvious you haven't absorbed what I 
said about this particular construct. Please re-read my previous post 
regarding this and try to understand it.

> Or should I do a $_GET['Ind'] = urlencode('Ind') on
> searchresults.php ?

If the URL on the searchpage was constructed properly then on 
searchresults.php the values passed can be read from $_GET directly with no 
further processing (ie no need for urldecode() and other such nonsese) on 
your part. But remember, you still need to validate the data you get from 
$_GET (and in general from $_POST etc) before you use them.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Unix soit qui mal y pense
 [Unix to him who evil thinks?]
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML + PHP is going to eat my shorts [SOLVED]

2004-11-16 Thread Marek Kilimajer
Jay Blanchard wrote:
[snip]

[/snip]
using fread the above line comae out like this(even though I was not
echoing the line, just processing)

...as soon as I added stripslashes the syntax error disappeared and
VIOLA!...xml file parsing at its finest!
magic_quotes_runtime enabled? what about turning it off?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question on query string

2004-11-16 Thread Chris W. Parker
Stuart Felenstein 
on Tuesday, November 16, 2004 8:28 AM said:

> --- Richard Davey <[EMAIL PROTECTED]> wrote:
> 
>> Use urldecode() to get them back to "normal" again.

[snip]

> Or should I do a $_GET['Ind'] = urlencode('Ind') on
> searchresults.php ?




hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] my own extension

2004-11-16 Thread Klaus Reimer
Uffe Kousgaard wrote:
It is a large delphi library I want to call from PHP, so I don't think
it is easier.
But you know your library and you have it under control so maybe it's 
easier to write C include files to interface your Kylix library from C 
instead of writing Delphi-Units to interface PHP from Kylix.

So I would try to first implement a C interface (or C++ if it has OO) 
for your Delphi library and then write a simple PHP extension which uses 
this C/C++ interface to use your delphi lib.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Auto-load class if it doesn't exists!

2004-11-16 Thread Bruno B B Magalhães
Hi people,
is it possible to have a solution that works like an autoloader... for 
example:

$myclass = new class();
but if this class wasn't loaded yet, it loads by itself... egg:
if(class_exists(class))
{
 $myclass = new class();
}
else
{
 require_once(PATH_DIR.'class.class.php');
$myclass = new class();
}
Regards,
Bruno B B Magalhaes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to path global object

2004-11-16 Thread Hongwei Li
Hi,

I have a question of how to path global object's values.  Below are some
simplified codes.  It has 4 pieces:

1. tsstart.php: -- this is the start point to be browsed



2. tsdata.php: -- to get data, here I set it as a 2-d array and assign
values to it to simplify the code



3. tsshow.php: -- display the values of $obj:

";
?>

 

 First Row: 
 Second Row: 

Next 
 

4. tsnext.php: -- to display the next 2-d array element's value:

";
include "tsshow.php";
?>

Now, when I browse tsstart.php, it displays:
result-set index: 0
  First Row: 0
  Second Row: 2
and the link "Next"

However, when I click the link "Next", it displays:
new ind: 1
result-set index: 1
  First Row:
  Second Row:

no values are displayed.  Apparently, $obj is not pathed to tsnext.php and
tsshow.php (the second time), but $ind is.  What is wrong in the above
codes?  Can somebody help me?

I greatly appreciate all help!

Hongwei Li

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] weekly email idea

2004-11-16 Thread Robby Russell
On some of the general lists (like I am on the python list), they have a
weekly email that someone puts together and sends out to the list with
tips and urls to things found throughout the week on the mailing list.
People post valuable links and information and it would be a quick
overview of the past week in URLs/quotes/etc.

I'd be happy to take this on initially (the python passes it around to
the more active people every once in a while), just wondering if you
think it would be worthwhile or not. We could even have, "best
javascript question of the week" section in the email. ;-)

Thoughts? I looked over the past several months and saw nothing like
this happening so I thought I'd put the idea out there and would be
happy to try it out for a few weeks. I don't think one email a week
would flood our inbox so any other concerns, comments or suggestions?

Cheers,

-Robby

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] Is Perl faster than PHP?

2004-11-16 Thread raditha dissanayake
Merlin wrote:
Hi there,
it came to my attention that most of the high traffic portals are 
using perl in the backend. Those sites do also apear to me to be very 
fast in comparison to most php sites. Are there any known performance 
comperissons between the two available? Or can one say that PHP or 
Perl is faster about x percent in general compared to the other one?
PHP is faster when running uphill and perl is faster when running 
download. On Sri Lankan roads they are both equally slow.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Authentication Class

2004-11-16 Thread raditha dissanayake
Bruno B B Magalhães wrote:
Hi guys,
well, I wrote a class for a big project (a framework), and here it 
is,  I was wondering if someone have any suggestions regarding 
flexibility  and security.
Wow it's the most artistic piece of php i have ever seen.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   >