RE: [PHP] Conditional popup driven from server-side

2008-04-08 Thread Arno Kuhl
 Arno Kuhl <[EMAIL PROTECTED]> wrote: 
> I know popup windows are a client-side issue, but I can't figure how 
> to create and close a popup window from the server side only on 
> condition, otherwise display normal browser page.
> 
> What I want is to accept a form, check the input, if there are errors 
> return them to the browser, if there aren't errors then popup a modal 
> window and start processing (a possibly long process) while displaying 
> results in the popup window, then automatically close the popup after 
> processing is complete and redirect to normal browser page with the 
> final results. I want to use the popup to (a) feedback ongoing 
> progress to the user, and (b) keep the browser side alive because the
process could take several minutes.
> 
> Googling for +php +popup is getting me nowhere, all the results are 
> for javascript. I know how to create a link or button that when 
> clicked will create a popup that will display the results of a php 
> script, but I need to do it the other way round. Can anyone please 
> suggest some pointers on how to generate a conditional popup from the 
> server, and then get the server to close it when done.
> 
> Thanks
> Arno

That's because it is a CLIENT side issue, the server isn't able to do it.

If you want to provide feedback on the form, then look into Ajax or use
output buffering and flushing to push out a status message as the form is
processed.  You could do this in a javascripted pop-up window or on the
window they submitted the form.

If it takes your script minutes to process a form  you need to look into
your processes.  I'd suggest verifying the form had all the pieces and then
advising them you will email them when the registration or what-not is
complete.

HTH,
Wolf
===

I fully understand this is a client side issue, but figured there may be a
way for the server to drive it using smoke and mirrors. For instance if the
input is ok I thought of redisplaying the completed form with an onload to
popup a modal window, then output progress to the window until the process
was finished, then send something to the window to close itself. But after
that I get stuck because I don't know how to make the underlying browser
page request the final results from the server, or have some way for the php
script to push the results to the page without a request. Or maybe it's all
javascript, with the browser page waiting for the window to close before
requesting the results? (though I see some timing issues with that solution,
unless I create a temp results page waiting for the browser's request). Has
anyone on the list done anything like this, or have any pointers, examples
or ideas? (BTW Wolf's suggestion of sending the results via email is not an
option in this case)

Thanks
Arno


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



[PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Ryan S
Hey everyone,

A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or  
just me.

(My money is on the last one :p )


Here's what I am trying to do:
In a form  I have a listbox with the values 1-5, and under the listbox i have a 
 with the id of "recips" (like so: ' +
  '' +
''+ x +'. Recipient\'s name:' +
'' +
'Recipient\'s email:' +
'' +
  '' +
'' +
'';
   }

document.getElementById('recips').innerHTML=msg;
}

/ # End JS code 

So far on the page everything is working, but when I click the submit button 
this is my PHP processing script:




It shows me everything that has been submitted but NOT any of the above 
dynamically made boxes values... but get this, it DOES show me all values... in 
IE7 _not_ in FF (am using 2.0.0.13)

Anybody else face anything like this?
Is this a bug in FF? Is $_REQUEST wrong to catch this? 
Dont know what the @#$@ to do... ANY help even a link to a site which can shed 
a little light would be appreciated.

Thanks in advance.

/Ryan



  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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



[PHP] Can someone tell me what a tilde means ?

2008-04-08 Thread Tony Collings
The humble tilde (~). I came across it the other day in some PHP code 
[code]~E_ERROR[/code]

I'm curious, can't find any documentation on it. In math it refers to 
propostional logic, is it the same thing in PHP ?



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



Re: [PHP] objects stored in sessions

2008-04-08 Thread Julien Pauli
Just a customer of mine who said that he'll be running PHP 4 and 5 on the
same server, and that he would share session data ;-)

Bye.
Julien.P

2008/4/7 Richard Heyes <[EMAIL PROTECTED]>:

> Have you seen how PHP makes difference between private, protected and
> > public
> > attributes of an object, into the session file ?
> > There are special caracters before them to recognize them.
> >
> > So the question is : is PHP4 able to read such a session file ?
> > And how will it interpret them when we ask him to unserialize data ?
> >
>
> The question(s) should be "Why would you want PHP4 to read a PHP5
> session?" and "Why would you expect it to work?". If you want to transfer
> data between versions you may want to investigate XMLRPC. Or perhaps the
> somewhat more verbose SOAP.
>
> --
> Richard Heyes
> Employ me:
> http://www.phpguru.org/cv
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] joins issues again

2008-04-08 Thread Steven Macintyre
 Hi all,

I have the following SQL statement;

SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
FROM sales
LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
LEFT JOIN branch ON IGuser.branchID = branch.branchID
LEFT JOIN company ON branch.companyID = '{$companyID}'
WHERE maincompanyid = '{$mcid}'
GROUP BY branch.branchID
ORDER BY branch_name ASC

However, i do not want those join records to be appended, only to return the 
count of records from sales.

Can someone assist me with this? I have tried differance variants of joins and 
none of the results are correct.

Sales tbl doesnt have the companyID, nor does IGuser

Regards,

Steven


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



[PHP] Could someone tell me what a tilde(~) in PHP does ?

2008-04-08 Thread Tony Collings
The humble tilde (~). I came across it the other day in some PHP code 
[code]~E_ERROR[/code]

I'm curious, can't find any documentation on it. In math it refers to 
propostional logic, is it the same thing in PHP ?



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



Re: [PHP] included file var scope

2008-04-08 Thread Németh Zoltán
>
>> In index.php rather than declaring vars like so...
>>
>> $var = 'value';
>>
>> ...declare them in the $GLOBALS array like so...
>>
>> $GLOBALS['var'] = 'value';
>>
>> $var is then in the global scope regardless of where it was set.
>>
>> -Stut
>>
>
> That would work. However I'm looking for a more generic solution,
> independent of the system that is being included. So basically I want to
> be able to include a file in my function while stepping out of the
> context of the function itself.
>
> E

put all those variables in a singleton.
then just use MyGlobals::getInstance()->myvar all over the place and you
can do whatever you want with them. of course don't forget to include the
class definition everywhere you want to use it

greets,
Zoltán Németh

>
> --
> 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] Can someone tell me what a tilde means ?

2008-04-08 Thread Németh Zoltán
> The humble tilde (~). I came across it the other day in some PHP code
> [code]~E_ERROR[/code]
>
> I'm curious, can't find any documentation on it. In math it refers to
> propostional logic, is it the same thing in PHP ?

~ $aNot  Bits that are set in $a are not set, and vice versa.

http://hu.php.net/manual/en/language.operators.bitwise.php

greets,
Zoltán Németh

>
>
>
> --
> 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] Using Googles SSO for GApps

2008-04-08 Thread Ian
Hi,

I was wondering if anyone has set up SSO using googles api for apps.
http://code.google.com/apis/apps/sso/saml_reference_implementation.html
is their implementation guide but I was wondering if anyone has done
it, and if I could have a peak at the code you used, mainly for the
encrypting of the information being sent, also for the generation of
the xml.

I have done some googling and can find a few java implementaions, but
no php ones - maybe I cant search so if there are some examples around
please excuse my ignorance.

Thanks in advance,
Ian

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



Re: [PHP] Could someone tell me what a tilde(~) in PHP does ?

2008-04-08 Thread Mark J. Reed
On Tue, Apr 8, 2008 at 6:19 AM, Tony Collings <[EMAIL PROTECTED]> wrote:
> The humble tilde (~). I came across it the other day in some PHP code
>  [code]~E_ERROR[/code]

That comes from C, not postpositional math.  It's  bitwise negation.
That is, the number 47 in binary is 110001, with leading 0's out to
whatever the word size is, usually 32
or 64 bits.  The ~ flips the bits, so on a 32-bit system ~47 is binary
11001110, which is -48 if you treat it as a
signed value and
429496248 as unsigned.

The tilde is most often seen in the company of flag values, where each bit
represents an option that is on or off.  Typically, you have a bunch
of constants
defined as the individual bit values, like say E_DEBUG.  Then ~E_DEBUG
means "turn on everything except E_DEBUG".   Often used  with bitwise
AND (&) as a mask to turn a particular bit off, as in  which turns off
E_DEBUG while leaving the other bits in $flag unchanged.

-- 
Mark J. Reed <[EMAIL PROTECTED]>

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



RE: [PHP] Recommended PHP Editors?

2008-04-08 Thread Wolf
Editpad circa 95
Notepad
VI
Nedit
Or the text editor that is the defauklt on ubuntu, which will do color specific 
coding for you once it knows the file type...

Wolf

-Original Message-
From: Nitsan Bin-Nun <[EMAIL PROTECTED]>
Sent: Tuesday, April 08, 2008 1:21 AM
To: php-general@lists.php.net
Subject: [PHP] Recommended PHP Editors?

Hi,
I'm working with serveral PHP editors, each has it own restrictions.
So umm, What editors do you recommend and what special functions and
dis/adventages they have (maybe im overkilling my own back).

Thanks In Advance,
Nitsan



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



[PHP] RES: [PHP-INSTALL] Can't enable use_trans_sid

2008-04-08 Thread Thiago Pojda
De: Keith Roberts [mailto:[EMAIL PROTECTED] 

>> Another question:
>>
>> Is there a way to make php use these fields [hidden sessid] instead of
cookies for 
>> session control? I still want to let cookies enabled for other stuff, 
>> but as it's messing up with multiple sessions because of poor cookie 
>> handling.
>>

>As the browser cookies use a different mechanism for storing 
>and retrieving cookies independently of PHP, I cannot see how 
>browser cookies can be clashing with your PHP session_id cookies.

The problem I run into sometimes is:
A user opens a IE instance and logs in. The same user, on the same PC, opens
a new instance (not from "Open in new window..." but from iexplore.exe) and
logs in again.
Then he has two independent sessions until the data from both sessions get
mixed up, showing data from one session in another. I can't think of any
other problem but erroneous session_ids being sent.

> If you use a pre-built PHP application that also uses PHP 
> session_id's, then that can cause a problem with your own 
> website if that also wants to use PHP session_id cookies.

This is the only PHP app running, there are two more that sometimes run but
they're JSPs.

>I guess the obvious way would for PHP session_id's to allow 
>multiple session_id_name(s), so each PHP application can choose 
>it's own session_id to be know by. This would also imply that 
>PHP has the capability to pass those multiple session_id's 
>between the respective PHP applications that are running side 
>by side on the same website. Maybe this is in the pipeline for 
>a future release of PHP, or has it already been implemented?

Not sure what you mean, but I already can use two sessions for a while.
Perhaps I'm not getting through the language barrier, but I did not
understand you. :/

Thanks!



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



[PHP] Re: Could someone tell me what a tilde(~) in PHP does ?

2008-04-08 Thread Tony Collings
Ah! excellent. Thanks for that. 

-
 
e. [EMAIL PROTECTED]
w. www.tonycollings.com
skype. supert3d
 
United States of America
t. 1-203-599-1604
m. 1-203-788-7787
 
United Kingdom
t. 020 8144 2453
m. 07763803980
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
"Mark J. Reed"
Posted At: 08 April 2008 08:50
Posted To: php.general
Conversation: Could someone tell me what a tilde(~) in PHP does ? 
Subject: Re: [PHP] Could someone tell me what a tilde(~) in PHP does ?

On Tue, Apr 8, 2008 at 6:19 AM, Tony Collings <[EMAIL PROTECTED]>
wrote:
> The humble tilde (~). I came across it the other day in some PHP code
>  [code]~E_ERROR[/code]

That comes from C, not postpositional math.  It's  bitwise negation.
That is, the number 47 in binary is 110001, with leading 0's out to
whatever the word size is, usually 32
or 64 bits.  The ~ flips the bits, so on a 32-bit system ~47 is binary
11001110, which is -48 if you treat it as a
signed value and
429496248 as unsigned.

The tilde is most often seen in the company of flag values, where each
bit
represents an option that is on or off.  Typically, you have a bunch
of constants
defined as the individual bit values, like say E_DEBUG.  Then ~E_DEBUG
means "turn on everything except E_DEBUG".   Often used  with bitwise
AND (&) as a mask to turn a particular bit off, as in  which turns off
E_DEBUG while leaving the other bits in $flag unchanged.

-- 
Mark J. Reed <[EMAIL PROTECTED]>


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



Re: [PHP] Could someone tell me what a tilde(~) in PHP does ?

2008-04-08 Thread Mark J. Reed
On Tue, Apr 8, 2008 at 8:50 AM, Mark J. Reed <[EMAIL PROTECTED]> wrote:
> That is, the number 47 in binary is 110001,

"
... or 10, if you want to be technical.  110001 is 49. :)

"The important thing is to understand what you're doing, rather than
to get the right answer." --Tom Lehrer

--
Mark J. Reed <[EMAIL PROTECTED]>

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



Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Mark Weaver

Ryan S wrote:

Hey everyone,

A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or  
just me.

(My money is on the last one :p )


Here's what I am trying to do:
In a form  I have a listbox with the values 1-5, and under the listbox i have a  with the id of 
"recips" (like so: ' +
  '' +
''+ x +'. Recipient\'s name:' +
'' +
'Recipient\'s email:' +
'' +
  '' +
'' +
'';
   }

document.getElementById('recips').innerHTML=msg;

}

/ # End JS code 

So far on the page everything is working, but when I click the submit button 
this is my PHP processing script:




It shows me everything that has been submitted but NOT any of the above 
dynamically made boxes values... but get this, it DOES show me all values... in 
IE7 _not_ in FF (am using 2.0.0.13)

Anybody else face anything like this?
Is this a bug in FF? Is $_REQUEST wrong to catch this? 
Dont know what the @#$@ to do... ANY help even a link to a site which can shed a little light would be appreciated.


Thanks in advance.

/Ryan



Hi Ryan,

Since I'm relatively new to PHP I could be off on this, but I'd say yes, 
$_REQUEST is wrong. I would think you'd want to use $_POST to receive 
the incoming values from a form.


--

Mark
-
the rule of law is good, however the rule of tyrants just plain sucks!
Real Tax Reform begins with getting rid of the IRS.
==
Powered by CentOS5 (RHEL5)

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



[PHP] New Ajax search component

2008-04-08 Thread Jeremy O'Connor
Hi

I have written a new component that can be included in your form, and allows 
the user to search a data source by entering the search term(s) and using 
Ajax to return a list of results in a dropdown control, from which the user 
can select the desired item. It uses the prototype JavaScript library, which 
you need to get from their website. You can view a demo and download the 
source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/

--
Jeremy O'Connor 



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



Re: [PHP] joins issues again

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 7:28 AM, Steven Macintyre
<[EMAIL PROTECTED]> wrote:
>  Hi all,
>
>  I have the following SQL statement;
>
>  SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
> FROM sales
> LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
> LEFT JOIN branch ON IGuser.branchID = branch.branchID
> LEFT JOIN company ON branch.companyID = '{$companyID}'
> WHERE maincompanyid = '{$mcid}'
> GROUP BY branch.branchID
> ORDER BY branch_name ASC
>
>  However, i do not want those join records to be appended, only to return the 
> count of records from sales.
>
>  Can someone assist me with this? I have tried differance variants of joins 
> and none of the results are correct.
>
>  Sales tbl doesnt have the companyID, nor does IGuser
>
>  Regards,
>
>  Steven

A couple things:

1) Are you looking for COUNT(DISTINCT salesID) rather than COUNT(salesID)?

2) Change your group clause to this: GROUP BY branch.branchID,
branch_name, company name
MySQL is pretty forgiving and will let you include fields in the
SELECT that are neither aggregated nor grouped, but it's bad practice.

Beyond that, a clearer explanation of what you expect to see in the
results would help a lot in building the query to get those results.

Andrew

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



Re: [PHP] Can someone tell me what a tilde means ?

2008-04-08 Thread Andrew Ballard
2008/4/8 Németh Zoltán <[EMAIL PROTECTED]>:
> > The humble tilde (~). I came across it the other day in some PHP code
>  > [code]~E_ERROR[/code]
>  >
>  > I'm curious, can't find any documentation on it. In math it refers to
>  > propostional logic, is it the same thing in PHP ?
>
>  ~ $aNot  Bits that are set in $a are not set, and vice versa.
>
>  http://hu.php.net/manual/en/language.operators.bitwise.php
>
>  greets,
>  Zoltán Németh

You are right, of course, but it is a good question of how one who is
totally unfamiliar with bitwise syntax in any language might ever find
that. For people learning the language, it's not like they can type a
tilde character into the documenation search and get results. Same for
the other operators. I suppose if one thinks to search for the word
'operators', one would get there eventually.

I remember how thrown I was years ago when I first tried ^ in PHP,
having first learned good ol' MS-DOS BASICA years ago, and thinking
that I was raising x to the power of y. :-)


Andrew

PS - For kicks, I just searched for the word 'tilde' and it returned
the delete() function. :-O


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 9:30 AM, Mark Weaver <[EMAIL PROTECTED]> wrote:
> Ryan S wrote:
>
> > Hey everyone,
> >
> > A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or
>  just me.
> >
> > (My money is on the last one :p )
> >
> >
> > Here's what I am trying to do:
> > In a form  I have a listbox with the values 1-5, and under the listbox i
> have a  with the id of "recips" (like so: '
> +
> >  '' +
> >''+ x +'. Recipient\'s name:' +
> >'' +
> >'Recipient\'s email:' +
> >'' +
> >  '' +
> > '' +
> > '';
> >   }
> >document.getElementById('recips').innerHTML=msg;
> > }
> >
> > / # End JS code 
> >
> > So far on the page everything is working, but when I click the submit
> button this is my PHP processing script:
> >
> >  > print_r($_REQUEST);
> > ?>
> >
> >
> > It shows me everything that has been submitted but NOT any of the above
> dynamically made boxes values... but get this, it DOES show me all values...
> in IE7 _not_ in FF (am using 2.0.0.13)
> >
> > Anybody else face anything like this?
> > Is this a bug in FF? Is $_REQUEST wrong to catch this? Dont know what the
> @#$@ to do... ANY help even a link to a site which can shed a little light
> would be appreciated.
> >
> > Thanks in advance.
> >
> > /Ryan
> >
> >
>
>  Hi Ryan,
>
>  Since I'm relatively new to PHP I could be off on this, but I'd say yes,
> $_REQUEST is wrong. I would think you'd want to use $_POST to receive the
> incoming values from a form.
>
>  --
>
>  Mark

I think in this case $_REQUEST and $_POST should both get you what you
want. I'm wondering whether your javascript is inserting the form
fields within the correct  tags.

Also, FWIW, I doubt it has anything to do with your problem but you
are assigning the same value for ID each time through the loop. The ID
attribute is supposed to be unique for each element on the page.

Andrew

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



Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Peter Ford

Mark Weaver wrote:

Ryan S wrote:

Hey everyone,

A bit of a puzzle here, dont know if this is a JS problem or PHP or FF 
or  just me.


(My money is on the last one :p )


Here's what I am trying to do:
In a form  I have a listbox with the values 1-5, and under the listbox 
i have a  with the id of "recips" (like so: cellpadding="2">' +

  '' +
''+ x +'. Recipient\'s name:' +
'' +
'Recipient\'s email:' +
'/>' +

  '' +
'' +
'';
   }
document.getElementById('recips').innerHTML=msg;
}

/ # End JS code 

So far on the page everything is working, but when I click the submit 
button this is my PHP processing script:





It shows me everything that has been submitted but NOT any of the 
above dynamically made boxes values... but get this, it DOES show me 
all values... in IE7 _not_ in FF (am using 2.0.0.13)


Anybody else face anything like this?
Is this a bug in FF? Is $_REQUEST wrong to catch this? Dont know what 
the @#$@ to do... ANY help even a link to a site which can shed a 
little light would be appreciated.


Thanks in advance.

/Ryan



Hi Ryan,

Since I'm relatively new to PHP I could be off on this, but I'd say yes, 
$_REQUEST is wrong. I would think you'd want to use $_POST to receive 
the incoming values from a form.




That would depend on the method that the form is using: GET or POST.

I don't think that's the answer.

Two things I would suggest:

1. Check that the Javascript is doing what you expect: you *are* using Firebug 
on Firefox, aren't you?  Also the WebDeveloper toolbar plugin is useful - it has 
a View Generated Source tool which will show you what Firefox thinks your page 
actually looks like after the JS has run...


2. Check that the TD you are loading with content is actually inside the  
tags - otherwise the inputs won't be included in the request/post variables...


Cheers
Pete

--
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 1:21 AM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote:
> Hi,
>  I'm working with serveral PHP editors, each has it own restrictions.
>  So umm, What editors do you recommend and what special functions and
>  dis/adventages they have (maybe im overkilling my own back).

RTFA:http://www.google.com/search?q=site%3Amarc.info+php+editors


-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 6:17 AM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hey everyone,
>
>  A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or 
>  just me.
>
>  (My money is on the last one :p )
[snip!]

Ryan, would it be possible for you to send an actual link to the
page in question?  You'll probably wind up with some better feedback
with a real-world test in this particular case.

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



RE: [PHP] New Ajax search component

2008-04-08 Thread Jay Blanchard
[snip]
I have written a new component that can be included in your form, and
allows 
the user to search a data source by entering the search term(s) and
using 
Ajax to return a list of results in a dropdown control, from which the
user 
can select the desired item. It uses the prototype JavaScript library,
which 
you need to get from their website. You can view a demo and download the

source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/
[/snip]

Cool...I'd have the 'submit' button hidden until results were returned
so as to avoid user confusion. 

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Jochem Maas

Robert Cummings schreef:

On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:

Hi,
I'm working with serveral PHP editors, each has it own restrictions.
So umm, What editors do you recommend and what special functions and
dis/adventages they have (maybe im overkilling my own back).


This comes up almost once a week. Read the archives.


indeed, although the proper answer never comes up. the proper answer is
ofcourse 'me' - as in I'm a highly recommended php editor - I have integrated
code generation and refactoring functionality that is lightyears ahead of any 
IDE

:-P



Cheers,
Rob.



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



[PHP] LOGIN Endless Loop Problem - Newbie

2008-04-08 Thread revDAVE
Hi folks - Newbie Question here...

I'm using php with filemaker and api from http://fmwebschool.com I am asking
them also for help (nothing yet) - but I thought that here would also be a
great place to ask:

Thread listed here for easier reading...
http://fmwebschool.com/frm/index.php?topic=2234.0

---

Start with question:

*Q: Can someone show me how to solve the endless loop problem that Only
Happens : *if you type a BAD LOGIN and it asks you to do it again - and then
you do a successful login*


---

Sorry for this verbose thread...

My Login Setup:

Normally: FMWS login is set so after a successful login - you will go to the
page you started from (that needed a login).

Currently I have things set so: after a login - before it goes to the page
you started from - ** it will first go to VARS.PHP and set some session
variables *** - then go to the final destination


*PROBLEM: Somehow it all works - EXCEPT if you type a BAD LOGIN and it asks
you to do it again - and then user types a successful login then:

*It gets STUCK in an *Endless Loop* and the browser says:

Too many redirects occurred trying to open ³http://127.0.0.1/nm/vars.php².
This might occur if you open a page that is redirected to open another page
which then is redirected to open the original page.

I'm still confused by this issue...

*Q: Can someone show me how to solve the endless loop problem that Only
Happens : *if you type a BAD LOGIN and it asks you to do it again - and then
you do a successful login*


1 ==MY LOGIN PAGE:





ALSO set like FMWS basic login - it goes to itself:


etc..


2 === MY VARS.PHP PAGE


... code set some variables





3 =FMStudio_Tools.php... (UNTOUCHED BY ME)

function fmsPerformLogin() {
   if(!session_id()) session_start();
   fmsCheckLogout();
   if(isset($_POST['login_user'])) {
  $user = fmsPOST('login_user');
  $pass = fmsPOST('login_pass');
  if($user == '' || $pass == '') return 'User Name or Password cannot be
blank';
  $conn = $_SESSION['login_conn'];
  if(isset($_SESSION['login_from']) && $_SESSION['login_from'] != '') {
 $from = $_SESSION['login_from'];
  }else if(isset($_POST['defaultURL']) && $_POST['defaultURL'] != '') {
 $from = $_POST['defaultURL'];
  }else{
 $from = 'index.php';
  }
  if(isset($_SESSION['login_type']) && $_SESSION['login_type'] ==
'table') {
 $_SESSION[$conn.'_tableLogin'] =
array('user'=>$user,'pass'=>$pass,'first'=>true);
  }else{
 $_SESSION[$conn.'_login'] =
array('user'=>$user,'pass'=>$pass,'first'=>true);
  }
  session_write_close();
  header('Location: '.$from);
  exit();
   }
   if(isset($_GET["errorMsg"]) && $_GET["errorMsg"] != '') {
  return $_GET["errorMsg"];
   }else{
  return '';
   }
}



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Robert Cummings schreef:
> >
> > This comes up almost once a week. Read the archives.
> >
>
>  indeed, although the proper answer never comes up. the proper answer is
>  ofcourse 'me' - as in I'm a highly recommended php editor - I have
> integrated
>  code generation and refactoring functionality that is lightyears ahead of
> any IDE
>
>  :-P

Welcome back, there, stranger!

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Robert Cummings

On Tue, 2008-04-08 at 11:02 -0400, Andrew Ballard wrote:
> On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> > Robert Cummings schreef:
> >
> > > On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:
> > >
> > > > Hi,
> > > > I'm working with serveral PHP editors, each has it own restrictions.
> > > > So umm, What editors do you recommend and what special functions and
> > > > dis/adventages they have (maybe im overkilling my own back).
> > > >
> > >
> > > This comes up almost once a week. Read the archives.
> > >
> >
> >  indeed, although the proper answer never comes up. the proper answer is
> >  ofcourse 'me' - as in I'm a highly recommended php editor - I have
> > integrated
> >  code generation and refactoring functionality that is lightyears ahead of
> > any IDE
> >
> >  :-P
> 
> Perhaps, but I'm sure I can't afford the license -- especially the
> multi-user version! :-)

Have you tried it out? Worst user friendliness EVER!

;)

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] joins issues again

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 7:28 AM, Steven Macintyre
<[EMAIL PROTECTED]> wrote:
>  Hi all,
>
>  I have the following SQL statement;
>
>  SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
> FROM sales
> LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
> LEFT JOIN branch ON IGuser.branchID = branch.branchID
> LEFT JOIN company ON branch.companyID = '{$companyID}'
> WHERE maincompanyid = '{$mcid}'
> GROUP BY branch.branchID
> ORDER BY branch_name ASC
>
>  However, i do not want those join records to be appended, only to return the 
> count of records from sales.
>
>  Can someone assist me with this? I have tried differance variants of joins 
> and none of the results are correct.
>
>  Sales tbl doesnt have the companyID, nor does IGuser

Steven,

Since this isn't a PHP-specific question, you'll probably receive
better responses on either the MySQL list (you didn't mention which
database system you're using, but I'll blindly and ignorantly assume
that's it), or at least the PHP-DB list.  I'm CC'ing both of those for
you.

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Robert Cummings schreef:
>
> > On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:
> >
> > > Hi,
> > > I'm working with serveral PHP editors, each has it own restrictions.
> > > So umm, What editors do you recommend and what special functions and
> > > dis/adventages they have (maybe im overkilling my own back).
> > >
> >
> > This comes up almost once a week. Read the archives.
> >
>
>  indeed, although the proper answer never comes up. the proper answer is
>  ofcourse 'me' - as in I'm a highly recommended php editor - I have
> integrated
>  code generation and refactoring functionality that is lightyears ahead of
> any IDE
>
>  :-P

Perhaps, but I'm sure I can't afford the license -- especially the
multi-user version! :-)

Andrew

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Jason Pruim


On Apr 8, 2008, at 11:02 AM, Andrew Ballard wrote:
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]>  
wrote:

Robert Cummings schreef:


On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:


Hi,
I'm working with serveral PHP editors, each has it own  
restrictions.
So umm, What editors do you recommend and what special functions  
and

dis/adventages they have (maybe im overkilling my own back).



This comes up almost once a week. Read the archives.



indeed, although the proper answer never comes up. the proper  
answer is

ofcourse 'me' - as in I'm a highly recommended php editor - I have
integrated
code generation and refactoring functionality that is lightyears  
ahead of

any IDE

:-P


Perhaps, but I'm sure I can't afford the license -- especially the
multi-user version! :-)


If you're going to license a multi-user version... I'd look into the  
AI interface one of the list members was working on earlier...  
Although I can't find the e-mail right now about it :)






Andrew

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




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 11:42 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:
>  On Apr 8, 2008, at 11:02 AM, Andrew Ballard wrote:
>
> > On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> >
> > > indeed, although the proper answer never comes up. the proper answer is
> > > ofcourse 'me' - as in I'm a highly recommended php editor - I have
> > > integrated
> > > code generation and refactoring functionality that is lightyears ahead
> of
> > > any IDE
> > >
> > > :-P
> > >
> >
> > Perhaps, but I'm sure I can't afford the license -- especially the
> > multi-user version! :-)
> >
>
>  If you're going to license a multi-user version... I'd look into the AI
> interface one of the list members was working on earlier... Although I can't
> find the e-mail right now about it :)

No thanks. I already have enough software installed on my computer
that tries to think for itself thanks go M$. I don't need anymore
artificial UN-intelligence.

Andrew

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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 11:46 AM, Andrew Ballard <[EMAIL PROTECTED]> wrote:
>
>  No thanks. I already have enough software installed on my computer
>  that tries to think for itself thanks go M$. I don't need anymore
>  artificial UN-intelligence.

Why I'm A Linux User - Reason #3127:  No God damned paperclip
telling me what to do.

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] joins issues again

2008-04-08 Thread Wolf

 Steven Macintyre <[EMAIL PROTECTED]> wrote: 
>  Hi all,
> 
> I have the following SQL statement;
> 
> SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
>   FROM sales
>   LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
>   LEFT JOIN branch ON IGuser.branchID = branch.branchID
>   LEFT JOIN company ON branch.companyID = '{$companyID}'
>   WHERE maincompanyid = '{$mcid}'
>   GROUP BY branch.branchID
>   ORDER BY branch_name ASC
> 
> However, i do not want those join records to be appended, only to return the 
> count of records from sales.
> 
> Can someone assist me with this? I have tried differance variants of joins 
> and none of the results are correct.
> 
> Sales tbl doesnt have the companyID, nor does IGuser
> 
> Regards,
> 
> Steven

Joins don't exist in PHP.  You probably mean an SQL list to talk with depending 
on your database taste.

Now, if you had some PHP code that was messing up, I'm all for checking it out 
and seeing if I can lend a hand ferreting out the issue.

Wolf

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



Re: [PHP] New Ajax search component

2008-04-08 Thread Jeremy O'Connor
""Jay Blanchard"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

> Cool...I'd have the 'submit' button hidden until results were returned
> so as to avoid user confusion.

Yes, something to add in a later version of the component.

--
Jeremy O'Connor 



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



Re: [PHP] joins issues again

2008-04-08 Thread Mark J. Reed
On Tue, Apr 8, 2008 at 7:28 AM, Steven Macintyre
<[EMAIL PROTECTED]> wrote:
>  I have the following SQL statement;

... and this relates to PHP how?

>  SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID

That doesn't make sense.  You're selecting a group function (COUNT)
along with other columns which you're not grouping on.   It might help
if you told us what you were trying to accomplish with the query.

But you'd be better off asking on a SQL list instead of a PHP one.


> FROM sales
> LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
> LEFT JOIN branch ON IGuser.branchID = branch.branchID
> LEFT JOIN company ON branch.companyID = '{$companyID}'
> WHERE maincompanyid = '{$mcid}'
> GROUP BY branch.branchID
> ORDER BY branch_name ASC
>
>  However, i do not want those join records to be appended, only to return the 
> count of records from sales.

So why are you joining in the first place?

-- 
Mark J. Reed <[EMAIL PROTECTED]>

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



[PHP] limit mail() function

2008-04-08 Thread Jordi Moles

hello everyone,

first of all... i'm sorry if this has been asked like a million times 
before... but i've been looking for info about this and found nothing so 
far.


anyway

I've got a server with apache2 and postfix and php5 providing hosting to 
some clients. I've got this big problem about clients sending spam 
massively, either consciously or because they website have been hacked. 
The main way to spam is by using the "mail()" function.
So far, i've only found how to disable the use of the mail() function 
completely in the php.ini file, but it's not a really good option to me, 
cause i run some server scripts to check for some things and they send 
some mails when they find something wrong.


So... i would like to know what options i have if i want to limit this 
function...


can i disable the function only for some users?
may be i can set a rate limit for it?

thanks.




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



Re: [PHP] New Ajax search component

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <[EMAIL PROTECTED]>
wrote:

> Hi
>
> I have written a new component that can be included in your form, and
> allows
> the user to search a data source by entering the search term(s) and using
> Ajax to return a list of results in a dropdown control, from which the
> user
> can select the desired item. It uses the prototype JavaScript library,
> which
> you need to get from their website. You can view a demo and download the
> source at: http://jeremywebdeveloper.co.za/code/ajaxsearch/


they pretty much have that in the scriptacuous lib under Ajax.Autocompleter,
atm

http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
http://demo.script.aculo.us/ajax/autocompleter
http://demo.script.aculo.us/ajax/autocompleter_customized

plus they have a client side version as well to mitigate bandwidth
consumption for small data sets.

http://wiki.script.aculo.us/scriptaculous/show/Autocompleter.Local

-nathan


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Jim Lucas

Ryan S wrote:

Hey everyone,

A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or  
just me.

(My money is on the last one :p )


Here's what I am trying to do:
In a form  I have a listbox with the values 1-5, and under the listbox i have a  with the id of 
"recips" (like so: ';


Move your table opening outside the loop



for (var x = 1; x <= nr; x++)
   {
   msg += '' +
''+ x +'. Recipient\'s name:' +
'' +


first off, in the world of CSS, this id would not be unique or valid for that 
matter.  id attributes can only contain numbers, letters, and underscores.


Don't think that is related to your problem, but it was something I thought I 
would point out.



'Recipient\'s email:' +
'' +
  '' +
'';
   }

msg += '';
move your table closing outside the loop.


document.getElementById('recips').innerHTML=msg;
}

/ # End JS code 

So far on the page everything is working, but when I click the submit button 
this is my PHP processing script:




It shows me everything that has been submitted but NOT any of the above 
dynamically made boxes values... but get this, it DOES show me all values... in 
IE7 _not_ in FF (am using 2.0.0.13)

Anybody else face anything like this?
Is this a bug in FF? Is $_REQUEST wrong to catch this? 
Dont know what the @#$@ to do... ANY help even a link to a site which can shed a little light would be appreciated.


Do you have your ... defined?

Show us the actual output of the print_r() call above.



Thanks in advance.

/Ryan



  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com





--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare


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



Re: [PHP] New Ajax search component

2008-04-08 Thread Eric Butera
On Tue, Apr 8, 2008 at 12:37 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
>  they pretty much have that in the scriptacuous lib under Ajax.Autocompleter,
>  atm
>
>  http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
>  http://demo.script.aculo.us/ajax/autocompleter
>  http://demo.script.aculo.us/ajax/autocompleter_customized
>
>  plus they have a client side version as well to mitigate bandwidth
>  consumption for small data sets.
>
>  http://wiki.script.aculo.us/scriptaculous/show/Autocompleter.Local
>
>  -nathan
>


As long as we're raining on parades ;)

http://developer.yahoo.com/yui/autocomplete/

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



[PHP] books for php

2008-04-08 Thread news.php.net
Which are the good books for learning php? 



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



Re: [PHP] books for php

2008-04-08 Thread Daniel Brown
On Sun, Apr 6, 2008 at 11:28 AM, news.php.net <[EMAIL PROTECTED]> wrote:
> Which are the good books for learning php?

Try to choose one that has pages, some (if not all) of those
should contain words forming sentences, and particularly those focused
on the PHP programming language.

http://marc.info/?w=2&r=1&s=php+books&q=t
http://search.gmane.org/?query=php+books&group=gmane.comp.php.general
http://www.google.com/search?q=php+books
http://www.faqs.org/docs/jargon/S/STFW.html

From http://php.net/mailinglists :
Posting guidelines
* 
* Check the archives before posting a question, chances
are it has already been asked and answered a few times.

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] books for php

2008-04-08 Thread Jason Pruim


On Apr 8, 2008, at 1:10 PM, Daniel Brown wrote:
On Sun, Apr 6, 2008 at 11:28 AM, news.php.net <[EMAIL PROTECTED]>  
wrote:

Which are the good books for learning php?


   Try to choose one that has pages, some (if not all) of those
should contain words forming sentences, and particularly those focused
on the PHP programming language.


You mean that books are supposed to have stuff other then pictures?  
Well hot damn Learn something new everyday!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP] books for php

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 1:26 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
>  You mean that books are supposed to have stuff other then pictures? Well
> hot damn Learn something new everyday!

Some programming books, such as guides to Windows source code,
have pictures.

http://www.pilotpig.net/images/winsource.jpg

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] books for php

2008-04-08 Thread Wolf

 Daniel Brown <[EMAIL PROTECTED]> wrote: 
> On Tue, Apr 8, 2008 at 1:26 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> >  You mean that books are supposed to have stuff other then pictures? Well
> > hot damn Learn something new everyday!
> 
> Some programming books, such as guides to Windows source code,
> have pictures.

Wait, you mean windows has source code that has words?  How are the script 
kiddies figuring out the exploits then?  ;)

And Jason, if you still have that copy of Forum with just pictures, can you 
scan it in for me and send it my way? :D

Wolf

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



[Fwd: Re: [PHP] Recommended PHP Editors?]

2008-04-08 Thread Zoltán Németh

sorry, forgot to include the list

Jason Pruim írta:


On Apr 8, 2008, at 11:02 AM, Andrew Ballard wrote:
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> 
wrote:

Robert Cummings schreef:


On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:


Hi,
I'm working with serveral PHP editors, each has it own restrictions.
So umm, What editors do you recommend and what special functions and
dis/adventages they have (maybe im overkilling my own back).



This comes up almost once a week. Read the archives.



indeed, although the proper answer never comes up. the proper answer is
ofcourse 'me' - as in I'm a highly recommended php editor - I have
integrated
code generation and refactoring functionality that is lightyears 
ahead of

any IDE

:-P


Perhaps, but I'm sure I can't afford the license -- especially the
multi-user version! :-)


If you're going to license a multi-user version... I'd look into the AI 
interface one of the list members was working on earlier... Although I 
can't find the e-mail right now about it :)


you mean Richard Lynch's AI, but I think that must be still in some beta
stage, as we see Lynch only once in a while come and post a couple dozen
messages ;)

greets,
Zoltán Németh







Andrew

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




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[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] Recommended PHP Editors?

2008-04-08 Thread Jason Pruim


On Apr 8, 2008, at 1:48 PM, Zoltán Németh wrote:

Jason Pruim írta:

On Apr 8, 2008, at 11:02 AM, Andrew Ballard wrote:
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas  
<[EMAIL PROTECTED]> wrote:

Robert Cummings schreef:


On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:


Hi,
I'm working with serveral PHP editors, each has it own  
restrictions.
So umm, What editors do you recommend and what special  
functions and

dis/adventages they have (maybe im overkilling my own back).



This comes up almost once a week. Read the archives.



indeed, although the proper answer never comes up. the proper  
answer is

ofcourse 'me' - as in I'm a highly recommended php editor - I have
integrated
code generation and refactoring functionality that is lightyears  
ahead of

any IDE

:-P


Perhaps, but I'm sure I can't afford the license -- especially the
multi-user version! :-)
If you're going to license a multi-user version... I'd look into  
the AI interface one of the list members was working on earlier...  
Although I can't find the e-mail right now about it :)


you mean Richard Lynch's AI, but I think that must be still in some  
beta stage, as we see Lynch only once in a while come and post a  
couple dozen messages ;)


That would be him! He might be trying to run it on a windows platform,  
which I've heard is tricky... Intelligence and Microsoft just don't  
seem to go together right ;)


Also, you might want to double check if you're hitting reply or reply- 
all :P



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]




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



Re: [PHP] Recommended PHP Editors?

2008-04-08 Thread Zoltán Németh

Jason Pruim írta:


On Apr 8, 2008, at 1:48 PM, Zoltán Németh wrote:

Jason Pruim írta:

On Apr 8, 2008, at 11:02 AM, Andrew Ballard wrote:
On Tue, Apr 8, 2008 at 10:56 AM, Jochem Maas <[EMAIL PROTECTED]> 
wrote:

Robert Cummings schreef:


On Tue, 2008-04-08 at 07:21 +0200, Nitsan Bin-Nun wrote:


Hi,
I'm working with serveral PHP editors, each has it own restrictions.
So umm, What editors do you recommend and what special functions and
dis/adventages they have (maybe im overkilling my own back).



This comes up almost once a week. Read the archives.



indeed, although the proper answer never comes up. the proper 
answer is

ofcourse 'me' - as in I'm a highly recommended php editor - I have
integrated
code generation and refactoring functionality that is lightyears 
ahead of

any IDE

:-P


Perhaps, but I'm sure I can't afford the license -- especially the
multi-user version! :-)
If you're going to license a multi-user version... I'd look into the 
AI interface one of the list members was working on earlier... 
Although I can't find the e-mail right now about it :)


you mean Richard Lynch's AI, but I think that must be still in some 
beta stage, as we see Lynch only once in a while come and post a 
couple dozen messages ;)


That would be him! He might be trying to run it on a windows platform, 
which I've heard is tricky... Intelligence and Microsoft just don't seem 
to go together right ;)


well, I doubt he would ever touch anything M$... ;)



Also, you might want to double check if you're hitting reply or 
reply-all :P


good point, I already checked it :)

greets,
Zoltán Németh




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]







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



Re: [PHP] limit mail() function

2008-04-08 Thread Per Jessen
Jordi Moles wrote:

> I've got a server with apache2 and postfix and php5 providing hosting
> to some clients. I've got this big problem about clients sending spam
> massively, either consciously or because they website have been
> hacked. The main way to spam is by using the "mail()" function.
> So far, i've only found how to disable the use of the mail() function
> completely in the php.ini file, but it's not a really good option to
> me, cause i run some server scripts to check for some things and they
> send some mails when they find something wrong.
> 
> So... i would like to know what options i have if i want to limit this
> function...
> 
> can i disable the function only for some users?
> may be i can set a rate limit for it?

Check your mail-server config - rate limits and such are probably best
done there.  


/Per Jessen, Zürich


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



Re: [PHP] New Ajax search component

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 10:50 AM, Eric Butera <[EMAIL PROTECTED]> wrote:

> On Tue, Apr 8, 2008 at 12:37 PM, Nathan Nobbe <[EMAIL PROTECTED]>
> wrote:
> >  they pretty much have that in the scriptacuous lib under
> Ajax.Autocompleter,
> >  atm
> >
> >  http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
> >  http://demo.script.aculo.us/ajax/autocompleter
> >  http://demo.script.aculo.us/ajax/autocompleter_customized
> >
> >  plus they have a client side version as well to mitigate bandwidth
> >  consumption for small data sets.
> >
> >  http://wiki.script.aculo.us/scriptaculous/show/Autocompleter.Local
> >
> >  -nathan
> >
>
>
> As long as we're raining on parades ;)
>
> http://developer.yahoo.com/yui/autocomplete/


lol!  ya, havent finished parsing through this one; but a good read on the
topic

http://extjs.com/forum/showthread.php?t=551

btw; planning on digging into extJs once i get a chance to take a piss :O

-nathan


[PHP] Between editors and books.....

2008-04-08 Thread Jay Blanchard
I have raised a whole new generation of curmudgeons! *sniff*


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



Re: [PHP] joins issues again

2008-04-08 Thread Jim Lucas

Steven Macintyre wrote:

 Hi all,

I have the following SQL statement;

SELECT count( salesID ) AS count, branch_name, company_name, branch.branchID
FROM sales
LEFT JOIN IGuser ON sales.IGuid = IGuser.IGuid
LEFT JOIN branch ON IGuser.branchID = branch.branchID
LEFT JOIN company ON branch.companyID = '{$companyID}'
WHERE maincompanyid = '{$mcid}'
GROUP BY branch.branchID
ORDER BY branch_name ASC


I know that your DB might be able to figure out what is and is not ambiguous, 
but, since we don't have the table structure to look at and compare.  How about 
using table.column naming for us.


Doing a desc `table_name` for us on each table would help also.



However, i do not want those join records to be appended, only to return the 
count of records from sales.

Can someone assist me with this? I have tried differance variants of joins and 
none of the results are correct.

Sales tbl doesnt have the companyID, nor does IGuser

Regards,

Steven





--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare


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



Re: [PHP] limit mail() function

2008-04-08 Thread Greg Bowser
As far as I know, there's no way you can do this via PHP.

PHP doesn't "know" about users on the system.  Generally, PHP is run as an
apache module, and thus the scripts are run as the user apache is running
as.

So to start with, you'd probably need to be running a Fast CGI + SuExec
setup or something similar.

I'm not sure how, or if there is a way to do this in postfix.  The mail()
function calls the sendmail binary, so one sort of hackish way might be to
move this binary and write a wrapper script that keeps track of per-user
rate limits, and then invokes the real sendmail binary.  Of course, in this
case, you'd also probably want to make sure the real sendmail binary
couldn't be executed and that users could not write to the file that keeps
track of the rate-limit.

-- Greg

On Tue, Apr 8, 2008 at 12:37 PM, Jordi Moles <[EMAIL PROTECTED]> wrote:

> hello everyone,
>
> first of all... i'm sorry if this has been asked like a million times
> before... but i've been looking for info about this and found nothing so
> far.
>
> anyway
>
> I've got a server with apache2 and postfix and php5 providing hosting to
> some clients. I've got this big problem about clients sending spam
> massively, either consciously or because they website have been hacked. The
> main way to spam is by using the "mail()" function.
> So far, i've only found how to disable the use of the mail() function
> completely in the php.ini file, but it's not a really good option to me,
> cause i run some server scripts to check for some things and they send some
> mails when they find something wrong.
>
> So... i would like to know what options i have if i want to limit this
> function...
>
> can i disable the function only for some users?
> may be i can set a rate limit for it?
>
> thanks.
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Between editors and books.....

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 2:13 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> I have raised a whole new generation of curmudgeons! *sniff*

/me golf-claps.

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] New Ajax search component

2008-04-08 Thread Eric Butera
On Tue, Apr 8, 2008 at 2:10 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> btw; planning on digging into extJs once i get a chance to take a piss :O

I've heard a lot of good things about that.  Let me know what you
think, after you piss of course. =)

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



Re: [PHP] limit mail() function

2008-04-08 Thread Per Jessen
Greg Bowser wrote:

> I'm not sure how, or if there is a way to do this in postfix.  The
> mail() function calls the sendmail binary, so one sort of hackish way
> might be to move this binary and write a wrapper script that keeps
> track of per-user rate limits, and then invokes the real sendmail
> binary.  

Pardon me, but that's one kludgy idea - postfix has rate-limitation
facilities you can use for this. 


/Per Jessen, Zürich


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



Re: [PHP] Between editors and books.....

2008-04-08 Thread Robert Cummings

On Tue, 2008-04-08 at 14:17 -0400, Daniel Brown wrote:
> On Tue, Apr 8, 2008 at 2:13 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> > I have raised a whole new generation of curmudgeons! *sniff*
> 
> /me golf-claps.

/me golf-claps with one hand

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



Re: [PHP] Between editors and books.....

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 2:38 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
>  On Tue, 2008-04-08 at 14:17 -0400, Daniel Brown wrote:
>  > On Tue, Apr 8, 2008 at 2:13 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote:
>  > > I have raised a whole new generation of curmudgeons! *sniff*
>  >
>  > /me golf-claps.
>
>  /me golf-claps with one hand

. o 0 {So that's what that sounds like.}

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] PHP gives session error on remote server, but not local test machine [SOLVED]

2008-04-08 Thread Stut

On 8 Apr 2008, at 04:15, Dave M G wrote:

PHP list,

Solving my own issue:

It turns out that some PHP scripts had an extra carriage return  
character at the end of the file. Once I removed these, the problem  
went away.


Strange that it only happened on some servers, not others, but there  
it is.


1. Enable E_ALL error_reporting and turn on display_errors - that  
should have told you the session could not be started because headers  
had already been sent


2. Don't put ?> when it's the last thing in a file, it's not necessary  
by design for this very reason


The servers where it worked probably had an implicit buffer configured  
thus not caring about output before session_start().


-Stut

--
http://stut.net/

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



RE: [PHP] Between editors and books.....

2008-04-08 Thread Jay Blanchard
[snip]
On Tue, Apr 8, 2008 at 2:38 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:
>
>  On Tue, 2008-04-08 at 14:17 -0400, Daniel Brown wrote:
>  > On Tue, Apr 8, 2008 at 2:13 PM, Jay Blanchard
<[EMAIL PROTECTED]> wrote:
>  > > I have raised a whole new generation of curmudgeons! *sniff*
>  >
>  > /me golf-claps.
>
>  /me golf-claps with one hand

. o 0 {So that's what that sounds like.}
[/snip]

I would have told you to watch out for the tree, but I didn't hear that
either.

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



Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Ryan S
Hi Guys,
Thanks for responding, will try to answer everyone in the same order.

Mark W:

Thanks for replying!

> Since I'm relatively new to PHP I could be off on this, but I'd say yes, 
> $_REQUEST is wrong. I would think you'd want to use $_POST to receive 
> the incoming values from a form.


$_REQUEST should work in this case (i think) as it works kind of like a "catch 
all"
While $_POST just catches POST and $_GET just catches GET...  $_REQUEST catches 
all requests be it get,post,cookie etc
for testing I always use $_REQUEST.

Andrew:
Thanks for replying!

> I think in this case $_REQUEST and $_POST should both get you what you
> want. I'm wondering whether your javascript is inserting the form
> fields within the correct  tags.

Yep, it is correct, further down I will post the URL so you can check it out if 
you want.

> Also, FWIW, I doubt it has anything to do with your problem but you
> are assigning the same value for ID each time through the loop. The ID
> attribute is supposed to be unique for each element on the page.

Tried changing it, no luck.

Pete F:
Thanks for replying!

> 1. Check that the Javascript is doing what you expect: you *are* using 
> Firebug 
> on Firefox, aren't you?  Also the WebDeveloper toolbar plugin is useful - it 
> has 
> a View Generated Source tool which will show you what Firefox thinks your 
> page 
> actually looks like after the JS has run...

Dont have either of them dont know how to use them actually, but will have 
a look after this email. I did hear of firebug though not the other one.

> 2. Check that the TD you are loading with content is actually inside the 
>  
> tags - otherwise the inputs won't be included in the request/post variables...

Yep, checked that. IE is getting it... FF is not. Which is really strange as IE 
is usually the bit*h that usually throws weird errors and results.

Daniel,
Thanks for replying!

  >  Ryan, would it be possible for you to send an actual link to the
  > page in question?  You'll probably wind up with some better feedback
  >  with a real-world test in this particular case.

Didnt want to bloat my post and take up extra time from the people who reply, 
but looks like posting links is the best option so will do:

http://www.coinpass.com/test/step2.php (to run the script)
http://www.coinpass.com/test/step2.phps (View the source, its just a html file 
really)
All Javascript and CSS is in the "http://www.coinpass.com/test/scripts/"; 
directory

The processing script just has
print_r($_REQUEST);
so its useless pointing you to the actual file source.

Jim L,
Thanks for replying!

> Show us the actual output of the print_r() call above.

Would be easier if you click on the top link/s and just click the submit button


Cheers!
R






  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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



Re: [PHP] limit mail() function

2008-04-08 Thread Greg Bowser
>Pardon me, but that's one kludgy idea

Hence my use of the term hackish. But really, is isn't all that
kludgy.  An software solution that implements this natively would have
to keep track of the stats somehow; undoubtely via some sort of stats
file. So the real difference is that two processes are run, instead of
one.  Yet, by the same "wrapper" logic, is it not kludgy that php
invokes the sendmail binary, instead of using some sort of native php
implementation?  And again, by the same logic, the sendmail binary
that comes with many MTAs is simply a wrapper to allow normal sendmail
usage.


>postfix has rate-limitation facilities you can use for this

I'm aware of several configuration directives that limit rate, none of
which directly limit the send rate local users.  Perhaps some kludgly
or elusive trick involving multiple options would do the trick; I
don't claim to be a postfix expert.  Perhaps, instead of making empty
statements, you might choose to enlighten me as per the exact
configuration that will accomplish this.

Of course, I spent some time googling, but it appears that not too
many people know (or at least write about) how to implement such
functionality.  I did manage to find two interesting items in my
searches:

http://www.postfix.org/anvil.8.html
http://www.opennix.com/email/postfix/policy/ratelimit.html

The former doesn't appear to be magical, and from what my limited and
apparently klugdy thoughts permit me to deduce, it seems to bear,
conceptually, at least a degree (Celsius, mind you) of similarity to
the aforementioned kludgy statistics idea... I didn't find any
documentation regarding the implementation of anvil.  And the latter,
well that's not even a native postfix solution, so apparently, I have
failed to find the alleged rate-limitation.

All cynical, superficial, and sarcastic storming somewhat consummate,
I can at last take solace knowing that I would, had you _suggested_ a
better solution, or had I not, kludgy though it apparently was, put
some effort into finding a solution, pardoned you.

And with the sarcasm, sincerity, and cynicism now accomplished, permit
me to offer my most sincere apologies for the above rude, and overly
verbose post.

-- Greg

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



[PHP] Common PHP functions benchmarks

2008-04-08 Thread Jason Knight
I've been running some benchmarks on popular PHP functions.  I would like to
get some input on them from the community.  So far I have run tests on
Arrays and PHP5's SPL ArrayObject, as well as loops and some networking
functions.


Here is a link to the code used for the benchmarks.
http://www.synthable.com/benchmarks/

Thanks,
Jason 


Re: [PHP] Common PHP functions benchmarks

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 1:52 PM, Jason Knight <[EMAIL PROTECTED]> wrote:

> I've been running some benchmarks on popular PHP functions.  I would like
> to
> get some input on them from the community.  So far I have run tests on
> Arrays and PHP5's SPL ArrayObject, as well as loops and some networking
> functions.
>
>
> Here is a link to the code used for the benchmarks.
> http://www.synthable.com/benchmarks/


i did some tests a couple of months ago; pitting array iteration vs.
iteration w/ spl iterators.  link is down atm; but will be back soon and ill
post again so you have something similar to look at.  a quick glance shows
you have some thorough tests; but for the results some graphs would be nice
:)  kinda hard to see 'the big picture' w/o them.

-nathan


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 3:51 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hi Guys,
[snip]
>  Andrew:
>  Thanks for replying!
>
[snip]
>  > Also, FWIW, I doubt it has anything to do with your problem but you
>  > are assigning the same value for ID each time through the loop. The ID
>  > attribute is supposed to be unique for each element on the page.
>
>  Tried changing it, no luck.

I didn't expect it to fix anything related to the problem you posted,
but it is something that should be fixed.


I looked at the HTML source (since I think that's where your problem
is). The problem is that you have  tags nested inside your table
between two rows:

  
  

While your nesting is correct insofar as making sure that your ,
,  and  tags don't cross each other, the  tag
can't be there. I see why you've done it that way - you have another
form nested inside a cell within the same table (you can't nest one
form within another), and your second form needs to span more than one
cell or row. You need to rethink your page flow and layout so that it
uses valid HTML structure. I don't know if you can combine both forms
into one or if you need to split the table apart.

FWIW, while validating the above solution I found an extra (empty and
unclosed)  tag inside the recipient table which prompted me to run
your HTML through the W3C validator. It found 19 errors that keep it
from validating as XHTML strict as specified in your DOCTYPE. Most of
these won't cause major problems, but the 6th error reported is the
cause of the problem you're having: "document type does not allow
element 'form' here".

Andrew

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



Re: [PHP] limit mail() function

2008-04-08 Thread Andrew Ballard
On Tue, Apr 8, 2008 at 3:51 PM, Greg Bowser <[EMAIL PROTECTED]> wrote:
>  >postfix has rate-limitation facilities you can use for this
>
>  I'm aware of several configuration directives that limit rate, none of
>  which directly limit the send rate local users.  Perhaps some kludgly
>  or elusive trick involving multiple options would do the trick; I
>  don't claim to be a postfix expert.  Perhaps, instead of making empty
>  statements, you might choose to enlighten me as per the exact
>  configuration that will accomplish this.
>
>  Of course, I spent some time googling, but it appears that not too
>  many people know (or at least write about) how to implement such
>  functionality.

Not being a sysadmin I can't tell you HOW to do it, but I can tell you
that nearly every shared-hosting service I have worked with implements
some level of throttling such that an account on that machine cannot
send more than some set number of messages per hour whether directly
through local SMTP or through sendmail, mail(), etc., so I know it CAN
be done, and it appears that more than a few people know how to do it.

Andrew

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



Re: [PHP] New Ajax search component

2008-04-08 Thread tedd

As long as we're raining on parades ;)

http://developer.yahoo.com/yui/autocomplete/

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


And to continue:

http://www.webbytedd.com/c/ajax-pop-down/


Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] New Ajax search component

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 3:53 PM, tedd <[EMAIL PROTECTED]> wrote:

> As long as we're raining on parades ;)
> >
> > http://developer.yahoo.com/yui/autocomplete/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> And to continue:
>
> http://www.webbytedd.com/c/ajax-pop-down/


thats the idea ;)

-nathan


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Ryan S
Hey!
Thanks Andrew, will look into those points that you sent me.

First thing to change will be the DOCTYPE I think, as i didht type that but 
must have copied code into a pre-made page...

Cheers!
R

- Original Message 
From: Andrew Ballard <[EMAIL PROTECTED]>
To: PHP General list 
Sent: Tuesday, April 8, 2008 11:18:36 PM
Subject: Re: [PHP] dynamic boxes problem... JS and PHP

On Tue, Apr 8, 2008 at 3:51 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hi Guys,
[snip]
>  Andrew:
>  Thanks for replying!
>
[snip]
>  > Also, FWIW, I doubt it has anything to do with your problem but you
>  > are assigning the same value for ID each time through the loop. The ID
>  > attribute is supposed to be unique for each element on the page.
>
>  Tried changing it, no luck.

I didn't expect it to fix anything related to the problem you posted,
but it is something that should be fixed.


I looked at the HTML source (since I think that's where your problem
is). The problem is that you have  tags nested inside your table
between two rows:

  
  

While your nesting is correct insofar as making sure that your ,
,  and  tags don't cross each other, the  tag
can't be there. I see why you've done it that way - you have another
form nested inside a cell within the same table (you can't nest one
form within another), and your second form needs to span more than one
cell or row. You need to rethink your page flow and layout so that it
uses valid HTML structure. I don't know if you can combine both forms
into one or if you need to split the table apart.

FWIW, while validating the above solution I found an extra (empty and
unclosed)  tag inside the recipient table which prompted me to run
your HTML through the W3C validator. It found 19 errors that keep it
from validating as XHTML strict as specified in your DOCTYPE. Most of
these won't cause major problems, but the 6th error reported is the
cause of the problem you're having: "document type does not allow
element 'form' here".

Andrew

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






  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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



Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 6:20 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hey!
>  Thanks Andrew, will look into those points that you sent me.
>
>  First thing to change will be the DOCTYPE I think, as i didht type that but 
> must have copied code into a pre-made page...

One thing I learned when screwing around with AJAX is that it,
like nearly everything that occurs in nature, must be customized to
play nicely with Microsoft things.  Call me bitter.  No, seriously, it
could be my new nickname.


//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
  if (window.XMLHttpRequest) {
return new XMLHttpRequest();
  } else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
  } else {
document.getElementById('p_status').innerHTML = 'Status: Cound not
create XmlHttpRequest Object.  Consider upgrading your browser.';
  }
}


It's something I had to use when playing around with a chat script
I was building a while ago:
http://pilotpig.net/gchat/

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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



Re: [PHP] New Ajax search component

2008-04-08 Thread tedd

At 4:17 PM -0600 4/8/08, Nathan Nobbe wrote:
On Tue, Apr 8, 2008 at 3:53 PM, tedd 
<[EMAIL PROTECTED]> wrote:


As long as we're raining on parades ;)

http://developer.yahoo.com/yui/autocomplete/

--

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



And to continue:

http://www.webbytedd.com/c/ajax-pop-down/


thats the idea ;)

-nathan


There are no new ideas, just different spins to old ones.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

Re: [PHP] New Ajax search component

2008-04-08 Thread Nathan Nobbe
On Tue, Apr 8, 2008 at 5:12 PM, tedd <[EMAIL PROTECTED]> wrote:

> At 4:17 PM -0600 4/8/08, Nathan Nobbe wrote:
>
> > On Tue, Apr 8, 2008 at 3:53 PM, tedd <
> > [EMAIL PROTECTED]> wrote:
> >
> > As long as we're raining on parades ;)
> >
> > 
> > http://developer.yahoo.com/yui/autocomplete/
> >
> > --
> >
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: 
> > http://www.php.net/unsub.php
> >
> >
> > And to continue:
> >
> > 
> > http://www.webbytedd.com/c/ajax-pop-down/
> >
> >
> > thats the idea ;)
> >
> > -nathan
> >
>
> There are no new ideas, just different spins to old ones.


i was alluding to the automatic invocation of ajax requests (the norm) in
your example vs. the required user interaction in the OPs.

-nathan


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Ryan S


Hello Bitter,
(so is that Bitter Andrew or Bitter Brown? :-)   )

Thanks for the little titbit of request code, have saved it and will certainly 
use it.
Lets see how the next version is, they promised to make the new IE stick closer 
to the standards.

Cheers!
R


On Tue, Apr 8, 2008 at 6:20 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hey!
>  Thanks Andrew, will look into those points that you sent me.
>
>  First thing to change will be the DOCTYPE I think, as i didht type that but 
> must have copied code into a pre-made page...

One thing I learned when screwing around with AJAX is that it,
like nearly everything that occurs in nature, must be customized to
play nicely with Microsoft things.  Call me bitter.  No, seriously, it
could be my new nickname.


//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
  if (window.XMLHttpRequest) {
return new XMLHttpRequest();
  } else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
  } else {
document.getElementById('p_status').innerHTML = 'Status: Cound not
create XmlHttpRequest Object.  Consider upgrading your browser.';
  }
}


It's something I had to use when playing around with a chat script
I was building a while ago:
http://pilotpig.net/gchat/

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!





  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com





  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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



[PHP] require_once dying silently

2008-04-08 Thread Richard S. Crawford
Hi, everyone.

This one's been driving me bonkers for an hour now.  Anyone have any idea
why require_once would be dying silently in the script below?



$CFG->dirroot   = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->dataroot  = $CFG->dirroot.'/moodledata';

require_once("$CFG->dirroot/lib/setup.php");


I've confirmed that the file setup.php exists and is readable.  I've got
error_reporting in php.ini set to E_ALL.  I'm running Apache 2 and PHP5 on
Kubuntu 7.10.  Nothing shows up in my apache error log, and PHP itself
produces absolutely no output, even though it will produce output galore
when I put in a deliberate syntax error.

I've also tried:


require_once($CFG->dirroot."/lib/setup.php");


but this didn't help.

Any assistance at all would be greatly appreciated.

-- 
Richard S. Crawford ([EMAIL PROTECTED])
http://www.mossroot.com
Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com)


Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Ryan S
Hello Bitter,
(so is that Bitter Andrew or Bitter Brown? :-)   )

Thanks for the little titbit of request code, have saved it and will certainly 
use it.
Lets see how the next version is, they promised to make the new IE stick closer 
to the standards.

Cheers!
R


On Tue, Apr 8, 2008 at 6:20 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hey!
>  Thanks Andrew, will look into those points that you sent me.
>
>  First thing to change will be the DOCTYPE I think, as i didht type that but 
> must have copied code into a pre-made page...

One thing I learned when screwing around with AJAX is that it,
like nearly everything that occurs in nature, must be customized to
play nicely with Microsoft things.  Call me bitter.  No, seriously, it
could be my new nickname.


//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
  if (window.XMLHttpRequest) {
return new XMLHttpRequest();
  } else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
  } else {
document.getElementById('p_status').innerHTML = 'Status: Cound not
create XmlHttpRequest Object.  Consider upgrading your browser.';
  }
}


It's something I had to use when playing around with a chat script
I was building a while ago:
http://pilotpig.net/gchat/

-- 

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!





  

You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com

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



Re: [PHP] require_once dying silently

2008-04-08 Thread Chris

Richard S. Crawford wrote:

Hi, everyone.

This one's been driving me bonkers for an hour now.  Anyone have any idea
why require_once would be dying silently in the script below?



$CFG->dirroot   = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->dataroot  = $CFG->dirroot.'/moodledata';

require_once("$CFG->dirroot/lib/setup.php");


I've confirmed that the file setup.php exists and is readable.  I've got
error_reporting in php.ini set to E_ALL.  I'm running Apache 2 and PHP5 on
Kubuntu 7.10.  Nothing shows up in my apache error log, and PHP itself
produces absolutely no output, even though it will produce output galore
when I put in a deliberate syntax error.


Syntax errors in which file? The calling one (where you have the 
require_once) or the lib/setup.php file?


Maybe something in your code is disabling your error reporting, I'd put 
both:


error_reporting(E_ALL);
ini_set('display_errors', true);

in before the require_once and see what happens.

--
Postgresql & php tutorials
http://www.designmagick.com/

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



Re: [PHP] require_once dying silently

2008-04-08 Thread Greg Bowser


Is it possible that something is "going wrong" between the definition
of $CFG->foo and when you require that could cause $CFG->dirroot to be
null? Then it would point to /lib/setup.php, which definitely
shouldn't exist and should thus throw an error, but maybe it's worth
looking into.

 That would rule out any error reporting problems
anyway.

Have you tried something to the effect of  on the first line of setup.php?  Adding  after the require_once() might also
help.

> I've confirmed that the file setup.php exists and is readable.
I apologize if this seems obvious, but for the sake of
brainstorming... it's readable by the user running apache, right? And
even if it weren't, that should have thrown an error *shrugs*

That's all I can think of. I hope it is of some use to you.





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



Re: [PHP] require_once dying silently

2008-04-08 Thread Casey
On Tue, Apr 8, 2008 at 8:27 PM, Greg Bowser <[EMAIL PROTECTED]> wrote:
> 
>
>  Is it possible that something is "going wrong" between the definition
>  of $CFG->foo and when you require that could cause $CFG->dirroot to be
>  null? Then it would point to /lib/setup.php, which definitely
>  shouldn't exist and should thus throw an error, but maybe it's worth
>  looking into.
>
>does not exist?'); ?> That would rule out any error reporting problems
>  anyway.
>
>  Have you tried something to the effect of   included'; ?> on the first line of setup.php?  Adding   print_r(get_included_files()); ?> after the require_once() might also
>  help.
>
>
>  > I've confirmed that the file setup.php exists and is readable.
>  I apologize if this seems obvious, but for the sake of
>  brainstorming... it's readable by the user running apache, right? And
>  even if it weren't, that should have thrown an error *shrugs*
>
>  That's all I can think of. I hope it is of some use to you.
>
>  
>
>  
>
>

You should try:


-- 
-Casey

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



Re: [PHP] books for php

2008-04-08 Thread Casey
On Tue, Apr 8, 2008 at 10:29 AM, Daniel Brown <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 8, 2008 at 1:26 PM, Jason Pruim <[EMAIL PROTECTED]> wrote:
>  >
>  >  You mean that books are supposed to have stuff other then pictures? Well
>  > hot damn Learn something new everyday!
>
> Some programming books, such as guides to Windows source code,
>  have pictures.
>
> http://www.pilotpig.net/images/winsource.jpg

ROFL.
-- 
-Casey

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



[PHP] Check XMLReader enable

2008-04-08 Thread hce
Hi,

How can I check if the XMLReader is enabled or not in php? Also, how
to config the php to support SOAP and WSDL?

Thank you.

Jim

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



[PHP] Setting php server

2008-04-08 Thread hce
Hi,

I am setting a lighty and php server in my local machine FC 6 for
testing my php source code. Both index.html and index.php have been
set in lighty. If I have an index.html on the server, the http
response was fine. But, if I set an index.php on the server, the
browser got a blank page, there were no errors on browser or lighty
access.log. What I could be missing?

$ php --version
PHP 5.1.6 (cli) (built: Sep 18 2007 09:07:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Thank you.

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




Re: [PHP] Setting php server

2008-04-08 Thread Iñigo Medina García
hce wrote:
> Hi,
> 
> I am setting a lighty and php server in my local machine FC 6 for
> testing my php source code. Both index.html and index.php have been
> set in lighty. If I have an index.html on the server, the http
> response was fine. But, if I set an index.php on the server, the
> browser got a blank page, there were no errors on browser or lighty
> access.log. What I could be missing?

Did you check lighty error.log?
Did you try with a simple  to check php configuration?

   Iñigo

> $ php --version
> PHP 5.1.6 (cli) (built: Sep 18 2007 09:07:04)
> Copyright (c) 1997-2006 The PHP Group
> Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
> 
> Thank you.
> 


-- 

Iñigo Medina García 
Librería Díaz de Santos Madrid (Spain)
[EMAIL PROTECTED]   [EMAIL PROTECTED]

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



Re: [PHP] New Ajax search component

2008-04-08 Thread Jeremy O'Connor

""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On Tue, Apr 8, 2008 at 7:41 AM, Jeremy O'Connor <[EMAIL PROTECTED]>
> wrote:
> they pretty much have that in the scriptacuous lib under 
> Ajax.Autocompleter,
> atm
>

OK, but my control only does the Ajax call when the user clicks the Go 
button, whereas the scriptaculous library does an Ajax call everytime the 
user presses a key.

--
Jeremy O'Connor 



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



Re: [PHP] require_once dying silently

2008-04-08 Thread Zoltán Németh

Richard S. Crawford írta:

Hi, everyone.

This one's been driving me bonkers for an hour now.  Anyone have any idea
why require_once would be dying silently in the script below?



$CFG->dirroot   = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->dataroot  = $CFG->dirroot.'/moodledata';

require_once("$CFG->dirroot/lib/setup.php");


the above won't work, as the parser will try to interpret $CFG and put 
it in the string first, then go ahead.

try this:
require_once($CFG->dirroot."/lib/setup.php");
or this:
require_once("{$CFG->dirroot}/lib/setup.php");

greets,
Zoltán Németh




I've confirmed that the file setup.php exists and is readable.  I've got
error_reporting in php.ini set to E_ALL.  I'm running Apache 2 and PHP5 on
Kubuntu 7.10.  Nothing shows up in my apache error log, and PHP itself
produces absolutely no output, even though it will produce output galore
when I put in a deliberate syntax error.

I've also tried:


require_once($CFG->dirroot."/lib/setup.php");


but this didn't help.

Any assistance at all would be greatly appreciated.




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



[PHP] How to create combo-boxes/list boxes connected with MS SQL Server database in PHP scripts

2008-04-08 Thread punhsr
Sir
I want to create combo-boxes/list-boxes from a table which is available in 
MS-Sql server database. I have established connectivity with ms-sql server 
database using odbc.
how can i create combo-boxes in my php scripts?
waiting for an early reply.

With regards

Pardeep Singh
Scientist-C
NIC Hoshiarpur