Re: [PHP] LAMP jobs

2003-11-20 Thread olinux
For $$$ or for the love?

here's a start: 

For the $$$
http://www.elance.com
http://www.scriptlance.com
http://www.rentacoder.com

For the love?
sourceforge.net
freshmeat.net
pear.php.net


olinux


--- Susan Ator <[EMAIL PROTECTED]> wrote:
> It seems like this question came up before. Is there
> a resource for people
> looking for jobs working with open source products
> (LAMP specifically)?
> 
> Thanks,
> 
> susan

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: [PHP] PHP to create Printable format

2003-11-20 Thread John W. Holmes
[EMAIL PROTECTED] wrote:

Right now, I am trying to do generation of report using PHP in which the 
report should be in a printable format later on.
How do you define a "printable format"?

Ideally, you want to do this in CSS. The "print version" would just load 
a differnet style sheet than the main format.

You can also do it with PHP, like conditionally including / excluding 
blocks, changing colors, fonts, sizes, etc

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] PHP to create Printable format

2003-11-20 Thread irinchiang
Hi all..

Right now, I am trying to do generation of report using PHP in which the 
report should be in a printable format later on.

Is there any solution to use PHP to accomplish such task??

The report is viewed in a web browser and how should I create a navigation 
link or something whereby user can click on it to view it in a printable 
format and print it ??

Another example site which demonstrate such feature would be:
-->http://www.devshed.com/Server_Side/PHP/patUser/patUser1/page1.html

All help are greatly appreciated. Thank You.

Regards, 
Irin.

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



Re: [PHP] How to use SELECT with multiple options enabled in forms....

2003-11-20 Thread John Nichel
John W. Holmes wrote:

Robert Restad wrote:

I yet have to find a way to actually determine 
 > how I could fetch i.e. the results from a SELECT
 > multiple-choice menu.
I think I already asnwered this today
Three more times, and you'll reach your quota.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to use SELECT with multiple options enabled in forms....

2003-11-20 Thread John W. Holmes
Robert Restad wrote:

I yet have to find a way to actually determine 
> how I could fetch i.e. the results from a SELECT
> multiple-choice menu.
I think I already asnwered this today



Now the values the user selected will be in an array, $foo, 
$_GET['foo'], $_POST['foo'], $_REQUEST['foo'], etc...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] How to use SELECT with multiple options enabled in forms....

2003-11-20 Thread John Nichel
Robert Restad wrote:

Now, use SELECT is simple enough. The Select Name gives a value, the one you selected of course...

However, I yet have to find a way to actually determine how I could fetch i.e. the results from a SELECT multiple-choice menu. 
What if I want the website visitor to choose from multiple values, and read them in a PHP script after the form is submitted?

Suggestions or ideas of how to solve this?

I figured this is probably a very easy task, but I've done a couple attempts, and yet unsuccessful... I can make and read the values of multiple checkboxes, but I cant figure out how to do this with a select ...

Best regards,
Robert.
This question was just asked a few hours ago, on this very list (not to 
mention the few times a week).  Anyway, since the list archives /must/ 
be broken


Choose
.
Choice

Now, putting the square brackets after the name of your form element, 
will pass the results as an array, which will now be available to your 
php script as

$_POST['whatever']

It will be an array, even if only one option is selected, so please 
treat as such.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] passthru gives error in httpd/error_log

2003-11-20 Thread Tom Rogers
Hi,

Friday, November 21, 2003, 10:53:08 AM, you wrote:
JH> I'm trying to run a super simple command through passthru.

JH> Here's my test.php file:

JH> 
JH> 
JH> 


JH> It works if run directly with "php test.php".
JH> When this is run from the browser, there is no output, and the
JH> following error is logged in /var/log/httpd/error_log :
JH> sh: /ls: No such file or directory

JH> What does this mean ? Any command I try instead of "ls -l",
JH> gives a similar error.

JH> The funky thing is that it HAS worked, but now it doesn't, and
JH> I have no idea what happened.

JH> Any clues and hints are much appreciated.

JH> /Jesper

You probably have to put the full path to ls



-- 
regards,
Tom

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



Re: [PHP] Curious about something....

2003-11-20 Thread John W. Holmes
Mike Migurski wrote:
Is there any particular advantage to having the default PHP install
exclude a lot of useful modules such as mcrypt, cli, sockets, etc?
The question sounded more like a technical one - is it an advantage in
terms of memory? CPU? startup overhead? etc.
Yeah, I think I misread that one. Sorry.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] How to use SELECT with multiple options enabled in forms....

2003-11-20 Thread Robert Restad
Now, use SELECT is simple enough. The Select Name gives a value, the one you selected 
of course...

However, I yet have to find a way to actually determine how I could fetch i.e. the 
results from a SELECT multiple-choice menu. 
What if I want the website visitor to choose from multiple values, and read them in a 
PHP script after the form is submitted?

Suggestions or ideas of how to solve this?

I figured this is probably a very easy task, but I've done a couple attempts, and yet 
unsuccessful... I can make and read the values of multiple checkboxes, but I cant 
figure out how to do this with a select ...

Best regards,
Robert.

RE: [PHP] Where can i find error log

2003-11-20 Thread Martin Towell
look for this line in your php.ini file

error_log = filename

but that's only going to help if you have

log_errors = On

HTH
Martin

> -Original Message-
> From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> Sent: Friday, 21 November 2003 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Where can i find error log
> 
> 
> On server display_error is off in php ini, so I do not get 
> the error msgs,
> is there anything like error log ? In this case how to find 
> the errors?
> 
> regard,
> manisha
> 
> -- 
> 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] Where can i find error log

2003-11-20 Thread Manisha Sathe
On server display_error is off in php ini, so I do not get the error msgs,
is there anything like error log ? In this case how to find the errors?

regard,
manisha

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



[PHP] Re: Zip Code Locator / Radius Search

2003-11-20 Thread Manuel Lemos
Hello,

On 11/20/2003 10:54 PM, Becoming Digital wrote:
This class does exactly what you need:

Class: phpZipLocator
http://www.phpclasses.org/phpziplocator


Thanks.  I checked the Repository, but apparently not in the right sections.  Don't you think it would be more appropriate in the "Geography" section? :-P
Yes, you are right. I guess the category did not exist when the class 
was contributed. Usually, the authors propose new categories. If the 
author had proposed that category then, it would have been classified 
properly. There are certainly many more classes that are not in all 
categories that they should, awaiting for somebody to classify them better.

I have added the class to that category now. Thanks for the suggestion.

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] passthru gives error in httpd/error_log

2003-11-20 Thread Jesper Hansen
I'm trying to run a super simple command through passthru.

Here's my test.php file:






It works if run directly with "php test.php".
When this is run from the browser, there is no output, and the
following error is logged in /var/log/httpd/error_log :
sh: /ls: No such file or directory

What does this mean ? Any command I try instead of "ls -l",
gives a similar error.

The funky thing is that it HAS worked, but now it doesn't, and
I have no idea what happened.

Any clues and hints are much appreciated.

/Jesper

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



[PHP] Re: Zip Code Locator / Radius Search

2003-11-20 Thread Becoming Digital
> This class does exactly what you need:
> 
> Class: phpZipLocator
> http://www.phpclasses.org/phpziplocator

Thanks.  I checked the Repository, but apparently not in the right sections.  Don't 
you think it would be more appropriate in the "Geography" section? :-P

Edward Dudlik
"Those who say it cannot be done
should not interrupt the person doing it."

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message - 
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: "Becoming Digital" <[EMAIL PROTECTED]>
Cc: "php-general" <[EMAIL PROTECTED]>
Sent: Thursday, 20 November, 2003 19:36
Subject: Re: Zip Code Locator / Radius Search


Hello,

On 11/20/2003 10:19 PM, Becoming Digital wrote:
> I need a "search by zip code," aka radius search feature for a current project.  I 
> know I've seen info on how this works but I can't seem to find it.  I guess my own 
> search abilities are malfunctioning.  Would someone be so kind as to point me to a 
> link?  Thanks a lot.

This class does exactly what you need:

Class: phpZipLocator
http://www.phpclasses.org/phpziplocator


-- 

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



Re: [PHP] Zip Code Locator / Radius Search

2003-11-20 Thread Becoming Digital
> http://phparch.com/issue.php?mid=9

Thanks!

> and it's even a free issue :)

and I'm even a subscriber. ;)

Edward Dudlik
"Those who say it cannot be done
should not interrupt the person doing it."

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message - 
From: "Marco Tabini" <[EMAIL PROTECTED]>
To: "Becoming Digital" <[EMAIL PROTECTED]>
Cc: "php-general" <[EMAIL PROTECTED]>
Sent: Thursday, 20 November, 2003 19:22
Subject: Re: [PHP] Zip Code Locator / Radius Search


This may help:

http://phparch.com/issue.php?mid=9

... and it's even a free issue :)


Marco

--

php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!

Complete searchable PHP mailing list archives at 
http://www.phparch.com/mailinglists

Becoming Digital wrote:
> I need a "search by zip code," aka radius search feature for a current project.  I 
> know I've seen info on how this works but I can't seem to find it.  I guess my own 
> search abilities are malfunctioning.  Would someone be so kind as to point me to a 
> link?  Thanks a lot.
> 
> Edward Dudlik
> "Those who say it cannot be done
> should not interrupt the person doing it."
> 
> wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU
> 

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



[PHP] Re: Zip Code Locator / Radius Search

2003-11-20 Thread Manuel Lemos
Hello,

On 11/20/2003 10:19 PM, Becoming Digital wrote:
I need a "search by zip code," aka radius search feature for a current project.  I know I've seen info on how this works but I can't seem to find it.  I guess my own search abilities are malfunctioning.  Would someone be so kind as to point me to a link?  Thanks a lot.
This class does exactly what you need:

Class: phpZipLocator
http://www.phpclasses.org/phpziplocator
--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zip Code Locator / Radius Search

2003-11-20 Thread Marco Tabini
This may help:

http://phparch.com/issue.php?mid=9

... and it's even a free issue :)

Marco

--

php|architect - The Magazine for PHP Professionals
Try us free at http://www.phparch.com!
Complete searchable PHP mailing list archives at 
http://www.phparch.com/mailinglists

Becoming Digital wrote:
I need a "search by zip code," aka radius search feature for a current project.  I know I've seen info on how this works but I can't seem to find it.  I guess my own search abilities are malfunctioning.  Would someone be so kind as to point me to a link?  Thanks a lot.

Edward Dudlik
"Those who say it cannot be done
should not interrupt the person doing it."
wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU

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


[PHP] Zip Code Locator / Radius Search

2003-11-20 Thread Becoming Digital
I need a "search by zip code," aka radius search feature for a current project.  I 
know I've seen info on how this works but I can't seem to find it.  I guess my own 
search abilities are malfunctioning.  Would someone be so kind as to point me to a 
link?  Thanks a lot.

Edward Dudlik
"Those who say it cannot be done
should not interrupt the person doing it."

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU

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



RE: [PHP] Curious about something....

2003-11-20 Thread Vail, Warren
I also thought it was a technical or resource question.  When not running as
a cgi, don't the extensions gain persistence, loading only the first time
requested or first time PHP is used, instead of loading with each request?
That kind of question.

Warren Vail

-Original Message-
From: Mike Migurski [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 3:22 PM
To: CPT John W. Holmes
Cc: Dan Joseph; [EMAIL PROTECTED]
Subject: Re: [PHP] Curious about something


>> Is there any particular advantage to having the default PHP install
>> exclude a lot of useful modules such as mcrypt, cli, sockets, etc?
>
>Honestly, this has kind of been discussed this week in the "encoder"
>thread. Where do you draw the line on what's useful or not and who does
>the deciding on that? What's useful to you may not be to me. The modules
>are easy enough to install if you need them, so you're just going to have
>to do that.

The question sounded more like a technical one - is it an advantage in
terms of memory? CPU? startup overhead? etc.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

-- 
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] Curious about something....

2003-11-20 Thread Mike Migurski
>> Is there any particular advantage to having the default PHP install
>> exclude a lot of useful modules such as mcrypt, cli, sockets, etc?
>
>Honestly, this has kind of been discussed this week in the "encoder"
>thread. Where do you draw the line on what's useful or not and who does
>the deciding on that? What's useful to you may not be to me. The modules
>are easy enough to install if you need them, so you're just going to have
>to do that.

The question sounded more like a technical one - is it an advantage in
terms of memory? CPU? startup overhead? etc.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] Mulitple selects from form drop down box

2003-11-20 Thread CPT John W. Holmes
From: "Jeff McKeon" <[EMAIL PROTECTED]>

> Is it possible to have a form "Drop down box" that allows multiple
> selects?  I know the form field itself exists, but It only seems to
> return the last item selected and not all of them.
>
> Note in the code below the line: 

This is the expected behavior. You're passing a bunch of "D1" variables in
the form data, each one overwriting the other in the $_POST array.

What you need to do is name you select element as an array.



Now $_POST['D1'] will be an array of all the items that were chosen.

---John Holmes...

ps: wouldn't it be easier to select multiple items if you had a size larger
than "1"??

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



Re: [PHP] Curious about something....

2003-11-20 Thread CPT John W. Holmes
From: "Dan Joseph" <[EMAIL PROTECTED]>

> Is there any particular advantage to having the default PHP install
exclude
> a lot of useful modules such as mcrypt, cli, sockets, etc?

Yes. I've found that I do not need those libraries and have a secret
agreement preventing them from being included...

Honestly, this has kind of been discussed this week in the "encoder" thread.
Where do you draw the line on what's useful or not and who does the deciding
on that? What's useful to you may not be to me. The modules are easy enough
to install if you need them, so you're just going to have to do that.

---John Holmes...

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



[PHP] Mulitple selects from form drop down box

2003-11-20 Thread Jeff McKeon
Is it possible to have a form "Drop down box" that allows multiple
selects?  I know the form field itself exists, but It only seems to
return the last item selected and not all of them.

Note in the code below the line: 
[code]



  
  
ship1
ship2
ship3
  



[code]

All this returns is: "Form info: ship2" 

Thanks,

Jeff

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



Re: [PHP] array_search

2003-11-20 Thread CPT John W. Holmes
From: "Jake McHenry" <[EMAIL PROTECTED]>

> I've been using array_search in my scripts for a while now, but have
> come across a problem. My new page has a textarea field. If I enter
> any new lines in the textarea, array_search returns false.
[snip]
> Kinda stuck here.. Not sure what I should try next...

How about showing us how you're using array_search, since it has nothing to
do with textareas or line breaks except in the context you're using it in...

---John Holmes...

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



[PHP] Curious about something....

2003-11-20 Thread Dan Joseph
Hi,

Is there any particular advantage to having the default PHP install exclude
a lot of useful modules such as mcrypt, cli, sockets, etc?

-Dan Joseph

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



Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Kelly Hallman
On Thu, 20 Nov 2003, Scott Fletcher wrote:
> > Anyway, don't do that, use an existing XML parser..
>
> I'll try.  I haven't got the PHP XML Parser to work, I think it is
> because the XML stuffs I receive is not a true XML, some of them don't
> have a closing tag either because one tag have actual data as an
> attribute inside one tag.  It is kind of frustrating to on not knowing
> what XML Parser will work.

I was only suggesting that rather than try to perfect your own parser,
you'd be better off spending that time getting comfortable with something
that already exists for this purpose. There is too much debugging,
testing, optimization and research required to build one that is adequate,
and many already exist that probably exceed any home-brew solution.

I have not done too much XML parsing in PHP yet, but you might look to 
PEAR for help with this. I've briefly experimented with the various PEAR 
XML packages, like XML_Tree and XML_Parser. Take a look:
http://pear.php.net/packages.php?catpid=22&catname=XML

If you're dealing with poorly formed XML then you've got another problem
if you're trying to actually parse it. To simply pull one or two values
out of the file, a regex still might be the quickest/dirtiest..

If you do want to move forward testing parsers and stuff, make yourself a
valid XML file to test with, so that is not the issue...worry about fixing
malformed XML later with the provider or through an intermediate filter..

-- 
Kelly Hallman
//Ultrafancy/

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



Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Scott Fletcher
I'll try.  I haven't got the PHP XML Parser to work, I think it is because
the XML stuffs I receive is not a true XML, some of them don't have a
closing tag either because one tag have actual data as an attribute inside
one tag.  It is kind of frustrating to on not knowing what XML Parser will
work.

Scott

"Kelly Hallman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 20 Nov 2003, Scott Fletcher wrote:
> > How exactly does the 3rd parameter option work.  I tried this but it
> > doesn't work, so I don't know how exactly does it work...  There isn't
> > detail information on the php.net website...
>
> "The optional offset parameter allows you to specify which character in
> haystack to start searching. The position returned is still relative to
> the the beginning of haystack."
>
> So if you are trying to find subsequent occurrences of the string, you'd
> need to make the offset be greater than the last character you checked, or
> you're going to keep getting the first occurrence.
>
> >$XML_Start = (strpos($res_str,"",1);
> >$XML_End = strpos($res_str,"]]>",2);
>
> If you're just trying to pull one bit of data out of a file, you might
> want to look into regex for this purpose. If you're actually trying to
> write a parser, I think you might do well to read up on how other parsers
> work (like, using a stack). Anyway, don't do that, use an existing XML
> parser.. unless you are on a learning quest.. then, by all means!
>
> -- 
> Kelly Hallman
> //Ultrafancy/

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



Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Scott Fletcher
Yea, the manual is clear but honestly, don't know what the offset really
meant since there is no definition or explaination of how the offset work.
All I know the definition of the offset is 'To balance each other out'.
Like a weighting scale where one weight is more than other and I would need
to add a bit of a weight to the lightest part to offset the other.  So, I
knew that is not what the manual meant so don't know how exactly does it
work since there's no explanation or example of it.

But now I understand when I saw your example, so I'll tweak the coding.
I'll also have to customize the codes to check to see if the HTML's CDATA is
returned or not as well as the XML's CDATA is returned or not.  Oh boy!

Thanks,
 Scott

"Mike Ford" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 20 November 2003 17:39, Scott Fletcher wrote:
>
> > How exactly does the 3rd parameter option work.  I tried this
> > but it doesn't
> > work, so I don't know how exactly does it work...  There isn't detail
> > information on the php.net website...
> >
> > --snip--
> >$XML_Start = (strpos($res_str,"",1);
> >$XML_End = strpos($res_str,"]]>",2);
> > --snip--
>
> The manual is perfectly clear -- the third parameter is the offset within
the string of where to start searching, not an occurrence number or any
other way of counting.  And the return value of strpos() is also an offset
within the string.  So, assuming your CDATA segments are nested (which the
above seems to imply), then:
>
> >$XML_Start = strpos($res_str, "", $HTML_Start);
> >$XML_End = strpos($res_str, "]]>", $HTML_End+3);
>
> If they're not nested, then the search order would need to be different
(you need to look for substrings in the order in which they occur in the
string as a whole) but the principle is exactly the same.
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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



[PHP] SQLite

2003-11-20 Thread Bronislav Klučka
Hi, I was trying to work with SQLite, everything is OK, but it seems not to
vork in thread, but in sequences. I mean: I perform a question which tooks 2
minutes, then another, which tooks 3 minutes, then I perform them both from
2 separated browser windows and both of them stops at the same time and both
of them tooks 5 minutes so it looks like it do not perform the queries in
threads.
Does anybody know, what does it means???

Bronislav Klucka

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



Re: [PHP] echo or print

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 12:36:42PM -0500, John W. Holmes wrote:
: 
: Jay Fitzgerald wrote:
: >
: >when should i use echo ' '; vs. print ' ';
: 
: You should always use echo. It'll make a significant performance 
: increase in your scripts as it's only four letters instead of five.



Also, the letter 'e' is smaller than 'p', so ASCII-based function
lookups will be faster as well.



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



Re: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Eugene Lee
On Thu, Nov 20, 2003 at 09:45:45AM -0500, Scott Fletcher wrote:
: 
: I can give the strpos() a shot but I seem to have problem with getting the
: strpos() to give me two seperate "" tags instead of just hte
: first one only...

Use the offset parameter:



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



RE: [PHP] array_search

2003-11-20 Thread Kelly Hallman
On Thu, 20 Nov 2003, Jay Blanchard wrote:
> $foo = $_POST['textarea'];
> $newFoo = str_replace("\n", " ", $foo);
> $arrayFoo = explode(" ", $newFoo);

In the code above any spaces on the lines will also be delimiters...
I missed that part of the requirement...?

Maybe I'm not understanding the problem, but why not just use something 
like $myarray = preg_split('/[\r\n]+/', $textarea) ?

-- 
Kelly Hallman
//Ultrafancy/

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



RE: [PHP] array_search

2003-11-20 Thread Jake McHenry
> -Original Message-
> From: Jake McHenry [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 20, 2003 2:51 PM
> To: 'Jay Blanchard'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] array_search
> 
> 
> > -Original Message-
> > From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 20, 2003 2:48 PM
> > To: Jake McHenry; [EMAIL PROTECTED]
> > Subject: RE: [PHP] array_search
> > 
> > 
> > [snip]
> > I've been using array_search in my scripts for a while now,
> > but have come across a problem. My new page has a textarea 
> > field. If I enter any new lines in the textarea, array_search 
> > returns false.
> > 
> > I have tried using html_encode, addslashes, serialize and
> > nothing yet has worked. My only other options that I can 
> > think of would be to limit the textarea to one line (change 
> > it to a regular text input
> > field) or do a regex on the posted data and replace the line 
> > returns with something else (which I have tried without 
> > success). [/snip]
> > 
> > Just a SWAG, but you are exploding the textarea into an array
> > using spaces for the explosion? If so use a replace function 
> > to replace the \n characters, then do your thing...following 
> > is untested...
> > 
> > $foo = $_POST['textarea'];
> > $newFoo = str_replace("\n", " ", $foo);
> > $arrayFoo = explode(" ", $newFoo);
> > 
> 
> 
> No, I wasn't doing this. I will try it though.
> 
> 
> 
> Thanks,
> 
> Jake McHenry
> Nittany Travel MIS Coordinator
> http://www.nittanytravel.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

I had to change it from \n to \r\n, but this really has no usefullness
over just changing the textarea into a regular text input field.

Just to keep things simple, I think this is what I'm going to do.

Thanks for the info



Thanks,

Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com

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



RE: [PHP] Re: PHP Encoders

2003-11-20 Thread Michael
I like POB too but it's an obsfuscator.  To fix your $email problem just do
a search for $2d4g3a5sd and change them all to $email.

An encoder would be Ioncube or Turck's mmcache but the server needs to be
installed with their software to run the encoded scripts.  POB doesn't need
anything installed to run.


-Original Message-
From: Ryan A [mailto:[EMAIL PROTECTED]
Sent: November 20, 2003 12:29 PM
To: R. Rajesh Jeba Anbiah
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: PHP Encoders


Hi,
POBs is really good, but I have had some weird problems when encoding large
files, especially if you take out the line breaks in the options.
Another problem with POBS is that you can have your "config.php" file not
encoded with the rest of the files, since it changes your variables (eg
$email becomes something like $2d4g3a5sd) your $email  variable is not
recognised in the rest of the program/s, which is quite a pain in the ass
explaining to a customer who just bought your software to enter the $email
variable in $2d4g3a5sd and their $blah variable in $234sdhk23 etc etc

I personally prefer CodeSecure from securecents.com at only 49$ but then,
i'm biased :-)

Cheers,
-Ryan


>  Did you try http://pobs.mywalhalla.net/ ?




> > Hi there !
> >
> > I am curretly looking for suitbale solutions for encoding PHP scripts
> > after developing a couple of comercial applications in PHP.
> >
> > Has anybody made any experience with several encoders like IONCUBE,
> > SOURCEGUARDIAN, ZEND, etc... so far?
>
>  Did you try http://pobs.mywalhalla.net/ ?
>
> ---
>  "One who mix sports and patriotism is a barbarian"
> Email: rrjanbiah-at-Y!com
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Remote computer name?

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 03:33, John Nichel wrote:

> Right...it doesn't return the machine name for any of my client machines
> (didn't expect it too on the DHCP boxes, but thought it might on the two
> static boxes).  For the two static machines, it returns the Charter
> (cable connection) and BellSouth (DSL connection) names, not my actual
> machine name...gateway (returns cable-68-114-97-96.sli.la.charter.com)
>  for the Charter connection and web01 (returns
> adsl-068-209-144-233.sip.msy.bellsouth.net) for the BellSouth.

By "remote computer name" I was assuming the OP meant the DNS name.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
There are more old drunkards than old doctors.
*/

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



RE: [PHP] array_search

2003-11-20 Thread Jake McHenry
> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 20, 2003 2:48 PM
> To: Jake McHenry; [EMAIL PROTECTED]
> Subject: RE: [PHP] array_search
> 
> 
> [snip]
> I've been using array_search in my scripts for a while now, 
> but have come across a problem. My new page has a textarea 
> field. If I enter any new lines in the textarea, array_search 
> returns false.
> 
> I have tried using html_encode, addslashes, serialize and 
> nothing yet has worked. My only other options that I can 
> think of would be to limit the textarea to one line (change 
> it to a regular text input
> field) or do a regex on the posted data and replace the line 
> returns with something else (which I have tried without 
> success). [/snip]
> 
> Just a SWAG, but you are exploding the textarea into an array 
> using spaces for the explosion? If so use a replace function 
> to replace the \n characters, then do your thing...following 
> is untested...
> 
> $foo = $_POST['textarea'];
> $newFoo = str_replace("\n", " ", $foo);
> $arrayFoo = explode(" ", $newFoo);
> 


No, I wasn't doing this. I will try it though.



Thanks,

Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com

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



RE: [PHP] array_search

2003-11-20 Thread Jay Blanchard
[snip]
I've been using array_search in my scripts for a while now, but have
come across a problem. My new page has a textarea field. If I enter
any new lines in the textarea, array_search returns false.

I have tried using html_encode, addslashes, serialize and nothing yet
has worked. My only other options that I can think of would be to
limit the textarea to one line (change it to a regular text input
field) or do a regex on the posted data and replace the line returns
with something else (which I have tried without success).
[/snip]

Just a SWAG, but you are exploding the textarea into an array using
spaces for the explosion? If so use a replace function to replace the \n
characters, then do your thing...following is untested...

$foo = $_POST['textarea'];
$newFoo = str_replace("\n", " ", $foo);
$arrayFoo = explode(" ", $newFoo);

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



Re: [PHP] Javascript question

2003-11-20 Thread Brent Baisley
Funny off-off topic stuff. But to address the original question, which 
I deleted already, the problem is in your html, not your javascript.
The syntax for selects is:

Colorado

You had the "name" parameter in the option, not the select.

Now about unclogging drains...

On Nov 20, 2003, at 2:05 PM, Jason Wong wrote:

On Friday 21 November 2003 02:38, Robin Kopetzky wrote:
Ah-hah! Jason hides under an email address that does not exist so one
cannot reply directly to him, only via the list. Does that not 
describe the
person well?
My address only accepts mail directly from the list, cuts down on the 
spam
somewhat. I hope you wasn't trying to spam me :)

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


[PHP] array_search

2003-11-20 Thread Jake McHenry
I've been using array_search in my scripts for a while now, but have
come across a problem. My new page has a textarea field. If I enter
any new lines in the textarea, array_search returns false.

I have tried using html_encode, addslashes, serialize and nothing yet
has worked. My only other options that I can think of would be to
limit the textarea to one line (change it to a regular text input
field) or do a regex on the posted data and replace the line returns
with something else (which I have tried without success).


Kinda stuck here.. Not sure what I should try next... 


Thanks,

Jake McHenry
Nittany Travel MIS Coordinator
http://www.nittanytravel.com

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



Re: [PHP] Remote computer name?

2003-11-20 Thread John Nichel
Jason Wong wrote:

> 3) you can always use gethostbyaddr($_SERVER['REMOTE_ADDR']) whenever it is 
> needed. But do note that $_SERVER['REMOTE_ADDR'] is not a wholly reliable 
> indicator of who your client is.

Right...it doesn't return the machine name for any of my client machines
(didn't expect it too on the DHCP boxes, but thought it might on the two
static boxes).  For the two static machines, it returns the Charter
(cable connection) and BellSouth (DSL connection) names, not my actual
machine name...gateway (returns cable-68-114-97-96.sli.la.charter.com)
 for the Charter connection and web01 (returns
adsl-068-209-144-233.sip.msy.bellsouth.net) for the BellSouth.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

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



Re: [PHP] Javascript question

2003-11-20 Thread Aaron Gould
$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);
You may want to call the screwFittings function after removeClog has 
returned, or there's going to be an awful mess.

But then again, perhaps the automatic garbage collection will take care 
of that?

--
Aaron Gould
Parts Canada - Web Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Remote computer name?

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 02:59, Jason Gerfen wrote:
> So in that case there isn't a $_SERVER function to gather the remote
> computer name?

1) print_r($_SERVER) to see what is available
2) it may be available if you have set your webserver to do DNS lookups. But 
because it is expensive (ie takes quite a while to do in comparison to simply 
serving the webpage) it is usually disabled
3) you can always use gethostbyaddr($_SERVER['REMOTE_ADDR']) whenever it is 
needed. But do note that $_SERVER['REMOTE_ADDR'] is not a wholly reliable 
indicator of who your client is.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Be valiant, but not too venturous.
Let thy attire be comely, but not costly.
-- John Lyly
*/

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



Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Jay Blanchard wrote:

[snip]
My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)
[/snip]
$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);
PHP rocks!

Of course, now we're offtopic, but it's funny.  That was great.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Two-way on-the-fly encryption

2003-11-20 Thread Ray
1. When you say "on my system in unencrypted form" do you indeed mean you
want data that can be encrypted and then unencrypted as opposed to a hash
like md5() that cannot be reversed? (I only ask this because a lot
times people use them synonymously when they should not.)

Yes, two way, like PKI.  Honestly, I'd like to be able to encrypt the stream
as it comes in and decrypt it on the way out.  I'd rather not know or have
access to, at any time, what's being transfered...

2. This isn't a question really but I spoke with my friend google (maybe you
two have met?) and he said this
"http://www.tonymarston.net/php-mysql/encryption.html";.

Haha, Yes, I've heard of him.  And yes, I did consult but didn't stumble
across this link.  Reading it now.

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



Re: [PHP] Remote computer name?

2003-11-20 Thread John Nichel
Jason Gerfen wrote:
John Nichel wrote:

Jas wrote:

I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the 
remote computer name?

[Snippit used]
$ipaddy = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of 
the server (i.e. localhost, 168.2.2.1)

jas


HTTP_HOST returns the name (or ip) of the machine on which php is 
running.  REMOTE_ADDR will return the ip of the client accessing the 
document.



> So in that case there isn't a $_SERVER function to gather the remote
> computer name?
> Jas
To the best of my knowledge, unless you're running php on a Windoze 
machine, with domain authenticated Windoze clients, no.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Javascript question

2003-11-20 Thread Jay Blanchard
[snip]
My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)
[/snip]

$strSinkTrap = fopen("/under/the/cabinet/", "w+");
while(!feof($strSinkTrap)){
unscrewFittings($pipe);
if($pipeUnscrewed == TRUE){
removeClog($hair, $grease, $grime);
}
}
fclose($strSinkTrap);

PHP rocks!

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



Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Robin Kopetzky wrote:

> Ah-hah! Jason hides under an email address that does not exist so one cannot
> reply directly to him, only via the list. Does that not describe the person
> well?
> 

Jason's actions describe him, not his email address.  Jason is a valued
member of this list and has helped countless people with php problems.
This is a php list; asking a non-php question by mistake (not knowing
were the real problem lies, thinking it's a php issue, etc.) is one
thing, but you stated that your question was an offtopic JavaScript
question, so the responses you get should be expected.  There are
numerous list for JS.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

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



Re: [PHP] Javascript question

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 02:38, Robin Kopetzky wrote:
> Ah-hah! Jason hides under an email address that does not exist so one
> cannot reply directly to him, only via the list. Does that not describe the
> person well?

My address only accepts mail directly from the list, cuts down on the spam 
somewhat. I hope you wasn't trying to spam me :)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You mean you didn't *know* she was off making lots of little phone companies?
*/

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



Re: [PHP] Remote computer name?

2003-11-20 Thread Jason Gerfen
So in that case there isn't a $_SERVER function to gather the remote 
computer name?
Jas
John Nichel wrote:

Jas wrote:

I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the 
remote computer name?

[Snippit used]
$ipaddy = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of 
the server (i.e. localhost, 168.2.2.1)

jas


HTTP_HOST returns the name (or ip) of the machine on which php is 
running.  REMOTE_ADDR will return the ip of the client accessing the 
document.



--
Jason Gerfen
Student Computing Group
Marriott Library
University of Utah
(801) 585-9810
[EMAIL PROTECTED]
"I'm not a robot like you. I don't like having disks crammed into me... unless they're Oreos, and then only in the mouth." ~Phillip J. Fry

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


Re: [PHP] Javascript question

2003-11-20 Thread John Nichel
Jason Wong wrote:
> On Friday 21 November 2003 02:24, Robin Kopetzky wrote:
> 
>>I know this may be off-topic but I've got a problem that I do not know how
>>to work around...
> 
> 
> Hey list moderators, can this list be renamed the 
> php-general-javascript-and-the-kitchen-sink list?
> 

My kitchen sink always gets clogged when we clean out the fridge.  Does
anyone know of a way I can fix that? ;)

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com

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



Re: [PHP] echo or print

2003-11-20 Thread Burhan Khalid
Tom Rogers wrote:

Hi,

Friday, November 21, 2003, 12:37:50 AM, you wrote:
JF> when should i use echo ' '; vs. print ' ';
JF> 
JF> Jay Fitzgerald, Design Director
JF> - Certified Professional Webmaster (CPW-A)
JF> - Certified Professional Web Designer (CPWDS-A)
JF> - Certified Professional Web Developer (CPWDV-A)
JF> - Certified E-Commerce Manager (CECM-A)
JF> - Certified Small Business Web Consultant (CWCSB-A)
JF> Bayou Internet - http://www.bayou.com
JF> Toll Free: 888.30.BAYOU (22968)
JF> Vox: 318.338.2034 / Fax: 318.338.2506
JF> E-Mail: [EMAIL PROTECTED]
JF> ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
JF>   
Jay, can you please reduce your signature? Because it leads to 
unnecessary fluff when people don't trim posts.

Tom, please trim your replies. We don't need to see the same signature 
twice (especially if its as grand as Jay's).

Where is that newbie email?
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
---
"Documentation is like sex: when it is good,
 it is very, very good; and when it is bad,
 it is better than nothing."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Javascript question

2003-11-20 Thread Jay Blanchard
[snip]
Ah-hah! Jason hides under an email address that does not exist so one
cannot
reply directly to him, only via the list. Does that not describe the
person
well?
[/snip]

I found Jason's reply to be humorous! You yourselef said that your
request was off topic. What did you expect? Here is something you may
want to read

http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange

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



RE: [PHP] Javascript question

2003-11-20 Thread Mike Migurski
>Ah-hah! Jason hides under an email address that does not exist so one
>cannot reply directly to him, only via the list. Does that not describe
>the person well?

Insofar as he is cautious about spam, sure.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



Re: [PHP] Remote computer name?

2003-11-20 Thread Mike Migurski
>> [Snippit used]
>> $ipaddy = $_SERVER['REMOTE_ADDR'];
>> $host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of
>> the server (i.e. localhost, 168.2.2.1)
>>
>> jas
>
>HTTP_HOST returns the name (or ip) of the machine on which php is
>running.  REMOTE_ADDR will return the ip of the client accessing the
>document.

More specifically, HTTP_HOST returns the hostname used in the current
request - this may change depending on virtual host settings and relies
upon the Host: header in the request. SERVER_NAME returns the name of the
machine on which php is running, and (afaik) is /not/ dependent on the
virtual host used. The two values are frequently the same.


-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



RE: [PHP] Javascript question

2003-11-20 Thread Robin Kopetzky
Ah-hah! Jason hides under an email address that does not exist so one cannot
reply directly to him, only via the list. Does that not describe the person
well?

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



RE: [PHP] echo or print

2003-11-20 Thread Johnson, Kirk
> when should i use echo ' '; vs. print ' ';

Here's a link listed in the manual at
http://www.php.net/manual/en/function.print.php

http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40

Kirk

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



Re: [PHP] Javascript question

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 02:24, Robin Kopetzky wrote:
> I know this may be off-topic but I've got a problem that I do not know how
> to work around...

Hey list moderators, can this list be renamed the 
php-general-javascript-and-the-kitchen-sink list?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Mustgo, n.:
Any item of food that has been sitting in the refrigerator so
long it has become a science project.
-- Sniglets, "Rich Hall & Friends"
*/

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



[PHP] Javascript question

2003-11-20 Thread Robin Kopetzky
I know this may be off-topic but I've got a problem that I do not know how
to work around...

I'm displaying a  list and the problem is getting the value back
after an 'onChange' event. Code is like this:


  



  
  


State

  
Colorado
New Mexico
  


  


I need to get the "state_name" back but all I get in the $_GET['state_name']
array is an empty value. Any clue as to why this won't work??

I don't want to use a 'Submit' button as this is very cumbersome when I add
the other 3  lists...

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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



[PHP] PHP LDAP attributes question

2003-11-20 Thread Cory Hicks
Hello,

I am having trouble returning attributes from an LDAP dir and was
curious if anyone had experienced similar issues. I am able to retrieve
the attributes in the $nds_stuff fine. However, once I add an attribute
to the array, I can get the last attribute in the array, but not the one
that comes before. For example, this returns usertier2, but not
usertier. If I switch the order, I can get the last one, but not the one
that comes before? 

Here is my code:

$filter="(|(cn=" . $login_name . "*))";

//Attributes to get from NDS
$nds_stuff = array("cn", "sn", "fullname", "usertier");

//doesn't work as expected
//returns usertier2, but usertier is empty
//$nds_stuff = array("cn", "sn", "fullname", "usertier","usertier2");


//Search for a specified filter on the directory with the scope of
LDAP_SCOPE_SUBTREE
$results=ldap_search($ldap, $dn, $filter, $nds_stuff);

$info = ldap_get_entries($ldap, $results);

//This loops Through the array
for ($i=0; $i < $info["count"]; $i++)
{

//Declare the LDAP results as session variables
$valid_user = strtolower($info[$i]["cn"][0]);
$user_tier = $info[$i]["usertier"][0];
$user_tier2 = $info[$i]["usertier2"][0];
$user_fullname = $info[$i]["fullname"][0];

} //Close LDAP login array loop

ldap_close($ldap);  

Any suggestions?

Cory

-- 
Cory Hicks <[EMAIL PROTECTED]>
TRI International

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



Re: [PHP] Remote computer name?

2003-11-20 Thread John Nichel
Jas wrote:
I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote 
computer name?

[Snippit used]
$ipaddy = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of 
the server (i.e. localhost, 168.2.2.1)

jas
HTTP_HOST returns the name (or ip) of the machine on which php is 
running.  REMOTE_ADDR will return the ip of the client accessing the 
document.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Two-way on-the-fly encryption

2003-11-20 Thread Jason Wong
On Friday 21 November 2003 01:31, Ray wrote:

> I thought of that and I do plan on implementing it on the way in and out.
> However, to meet HIPA and other business requirements, the data can not
> exist at any point in time on my system in unencrypted form.  I do not want
> to be able to view it and I do not want to know what is there.

To be pedantic, the data *has* to exist on your system in an unencrypted form 
albeit for as long as it takes for you to encrypt it and then remove the 
unencrypted data.

> Any other suggestions?

manual > Mcrypt Encryption Functions

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
You shouldn't wallow in self-pity.  But it's OK to put your feet in it
and swish them around a little.
-- Guindon
*/

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



RE: [PHP] Two-way on-the-fly encryption

2003-11-20 Thread Chris W. Parker
Ray 
on Thursday, November 20, 2003 9:32 AM said:

> I thought of that and I do plan on implementing it on the way in and
> out. However, to meet HIPA and other business requirements, the data
> can not exist at any point in time on my system in unencrypted form. 
> I do not want to be able to view it and I do not want to know what is
> there. 
> 
> Any other suggestions?

Hmm... That's quite a different thing and unless I read your original
post wrong I don't think this part was mentioned. But in any case a few
questions.

1. When you say "on my system in unencrypted form" do you indeed mean
you want data that can be encrypted and then unencrypted as opposed to a
hash like md5() that cannot be reversed? (I only ask this because a lot
times people use them synonymously when they should not.)

2. This isn't a question really but I spoke with my friend google (maybe
you two have met?) and he said this
"http://www.tonymarston.net/php-mysql/encryption.html";.


hth,
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



RE: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Ford, Mike [LSS]
On 20 November 2003 17:39, Scott Fletcher wrote:

> How exactly does the 3rd parameter option work.  I tried this
> but it doesn't
> work, so I don't know how exactly does it work...  There isn't detail
> information on the php.net website...
> 
> --snip--
>$XML_Start = (strpos($res_str,"",1);
>$XML_End = strpos($res_str,"]]>",2);
> --snip--

The manual is perfectly clear -- the third parameter is the offset within the string 
of where to start searching, not an occurrence number or any other way of counting.  
And the return value of strpos() is also an offset within the string.  So, assuming 
your CDATA segments are nested (which the above seems to imply), then:

>$XML_Start = strpos($res_str, "", $HTML_Start);
>$XML_End = strpos($res_str, "]]>", $HTML_End+3);

If they're not nested, then the search order would need to be different (you need to 
look for substrings in the order in which they occur in the string as a whole) but the 
principle is exactly the same.

Cheers!

Mike

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

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



Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Kelly Hallman
On Thu, 20 Nov 2003, Scott Fletcher wrote:
> How exactly does the 3rd parameter option work.  I tried this but it
> doesn't work, so I don't know how exactly does it work...  There isn't
> detail information on the php.net website...

"The optional offset parameter allows you to specify which character in 
haystack to start searching. The position returned is still relative to 
the the beginning of haystack."

So if you are trying to find subsequent occurrences of the string, you'd
need to make the offset be greater than the last character you checked, or
you're going to keep getting the first occurrence.

>$XML_Start = (strpos($res_str,"",1);
>$XML_End = strpos($res_str,"]]>",2);

If you're just trying to pull one bit of data out of a file, you might
want to look into regex for this purpose. If you're actually trying to
write a parser, I think you might do well to read up on how other parsers
work (like, using a stack). Anyway, don't do that, use an existing XML
parser.. unless you are on a learning quest.. then, by all means!

-- 
Kelly Hallman
//Ultrafancy/

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



Re: [PHP] Session vars not echoing?

2003-11-20 Thread John W. Holmes
Jas wrote:

[Script registering vars - sessions.php]
/* Format Date & Time */
$hour = (date("H:i:s"));
$day = (date("d"));
$date =  (date("F $day, Y"));
Don't you mean
$data = date('F d, Y');
I don't see why you're calculating $day and then putting it in date().

/* Register vars */
$_SESSION['date'] = $date;
[Main script - index.php]
require 'scripts/sessions.php';
echo $_SESSION['date'];  //This is not showing up in browser?
I do not see session_start() anywhere...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] echo or print

2003-11-20 Thread John W. Holmes
Jay Fitzgerald wrote:

when should i use echo ' '; vs. print ' ';
You should always use echo. It'll make a significant performance 
increase in your scripts as it's only four letters instead of five.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


RE: [PHP] Usort an array.

2003-11-20 Thread Jay Frumkin
Try using rsort()

Jay

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



[PHP] Re: Usort an array.

2003-11-20 Thread pete M
array_reverse()

Vincent M. wrote:

Hello,

I have an array like that:
$return[0]["photo"] = monuments_01.jpg
$return[1]["photo"] = monuments_00.jpg
$return[2]["photo"] = monuments_03.jpg
$return[3]["photo"] = monuments_02.jpg
$return[4]["photo"] = monuments_04.jpg
If I use the sort function:
sort($return) ;
I get:
$return[0]["photo"] = monuments_00.jpg
$return[1]["photo"] = monuments_01.jpg
$return[2]["photo"] = monuments_02.jpg
$return[3]["photo"] = monuments_03.jpg
$return[4]["photo"] = monuments_04.jpg
Fine, but I'd like this result too:
$return[0]["photo"] = monuments_04.jpg
$return[1]["photo"] = monuments_03.jpg
$return[2]["photo"] = monuments_02.jpg
$return[3]["photo"] = monuments_01.jpg
$return[4]["photo"] = monuments_00.jpg
And usort does not work, which function should I use ?

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


[PHP] Remote computer name?

2003-11-20 Thread Jas
I am at a loss here but doesn't $_SERVER['HTTP_HOST'] return the remote 
computer name?

[Snippit used]
$ipaddy = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['HTTP_HOST']; // as of now it is getting the name of 
the server (i.e. localhost, 168.2.2.1)

jas

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


[PHP] Re: Session vars not echoing?

2003-11-20 Thread Jas
Yeah I did that, sorry I just didn't note it in the snippit.. and it is 
now working with the $_SESSION function, i just had to restart the 
browser to clear the cache after updating the code.
jas

Pete M wrote:
need to issue a

session_start()

at top of page

Pete

Jas wrote:

Not sure why this is happening but I think it has something to do with 
an include statement...
[Server environment]
Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3
register_globalsOnOn
report_memleaksOnOn
safe_modeOffOff
safe_mode_exec_dirno valueno value
Session Support enabled

[Script registering vars - sessions.php]
/* Format Date & Time */
$hour = (date("H:i:s"));
$day = (date("d"));
$date =  (date("F $day, Y"));
/* Register vars */
$_SESSION['date'] = $date;
[Main script - index.php]


session_start()

require 'scripts/sessions.php';

echo $_SESSION['date'];  //This is not showing up in browser?

Any help is appreciated...
Jas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Two-way on-the-fly encryption

2003-11-20 Thread Ray
Chris,

I thought of that and I do plan on implementing it on the way in and out.
However, to meet HIPA and other business requirements, the data can not
exist at any point in time on my system in unencrypted form.  I do not want
to be able to view it and I do not want to know what is there.

Any other suggestions?

Thanks!

PS, sorry about the multiple posts.  First time posting and the moderating
system confused me.  ;)

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



Re: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Scott Fletcher
How exactly does the 3rd parameter option work.  I tried this but it doesn't
work, so I don't know how exactly does it work...  There isn't detail
information on the php.net website...

--snip--
   $XML_Start = (strpos($res_str,"",1);
   $XML_End = strpos($res_str,"]]>",2);
--snip--

Scott

"Mike Ford" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 20 November 2003 14:53, Scott Fletcher wrote:
>
> > Hi Everyone!
> >
> > Is there a way to get the strpos() to find the next needle in
> > the haystack instead of just the 1st one only?  (Where the 1st
> > needle is the same string as the next needle)...
>
> Look at the optional 3rd parameter to strpos().
>
> Cheers!
>
> Mike
>
> -
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

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



[PHP] Usort an array.

2003-11-20 Thread Vincent M.
Hello,

I have an array like that:
$return[0]["photo"] = monuments_01.jpg
$return[1]["photo"] = monuments_00.jpg
$return[2]["photo"] = monuments_03.jpg
$return[3]["photo"] = monuments_02.jpg
$return[4]["photo"] = monuments_04.jpg
If I use the sort function:
sort($return) ;
I get:
$return[0]["photo"] = monuments_00.jpg
$return[1]["photo"] = monuments_01.jpg
$return[2]["photo"] = monuments_02.jpg
$return[3]["photo"] = monuments_03.jpg
$return[4]["photo"] = monuments_04.jpg
Fine, but I'd like this result too:
$return[0]["photo"] = monuments_04.jpg
$return[1]["photo"] = monuments_03.jpg
$return[2]["photo"] = monuments_02.jpg
$return[3]["photo"] = monuments_01.jpg
$return[4]["photo"] = monuments_00.jpg
And usort does not work, which function should I use ?

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


Re: [PHP] Re: PHP Encoders

2003-11-20 Thread Ryan A
Hi,
POBs is really good, but I have had some weird problems when encoding large
files, especially if you take out the line breaks in the options.
Another problem with POBS is that you can have your "config.php" file not
encoded with the rest of the files, since it changes your variables (eg
$email becomes something like $2d4g3a5sd) your $email  variable is not
recognised in the rest of the program/s, which is quite a pain in the ass
explaining to a customer who just bought your software to enter the $email
variable in $2d4g3a5sd and their $blah variable in $234sdhk23 etc etc

I personally prefer CodeSecure from securecents.com at only 49$ but then,
i'm biased :-)

Cheers,
-Ryan


>  Did you try http://pobs.mywalhalla.net/ ?




> > Hi there !
> >
> > I am curretly looking for suitbale solutions for encoding PHP scripts
> > after developing a couple of comercial applications in PHP.
> >
> > Has anybody made any experience with several encoders like IONCUBE,
> > SOURCEGUARDIAN, ZEND, etc... so far?
>
>  Did you try http://pobs.mywalhalla.net/ ?
>
> ---
>  "One who mix sports and patriotism is a barbarian"
> Email: rrjanbiah-at-Y!com
>
> -- 
> 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] On-the-fly encryption

2003-11-20 Thread Chris W. Parker
Ray 
on Wednesday, November 19, 2003 9:44 AM said:

> Any ideas on how to accomplish this within the PHP construct?

You already posted this question and I've already responded to it. Check
the old thread.

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



[PHP] Re: file_exists on Windows problem

2003-11-20 Thread Chris Williams
Thanks, that worked

"David Strencsev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If you're using NTFS file system... please make sure that the PHP's
temporay
> UPLOAD directory and SESSIONDATA directory are set with the correct
> permissions.
> I mean that the user IUSR_YOURCOMPUTER has write permissions in these
> directories.
>
> Hope it will help
>
> - David Strencsev

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



[PHP] On-the-fly encryption

2003-11-20 Thread Ray
I want to do two-way encryption on a file coming through the web server.  In
this context, I would want to generate a public and private key, encrypt the
file stream (i.e., don't want to write the unencrypted file to disk first
and then encrypt it; I want to encrypt the stream as it comes in) with the
public, send the private to the recipient, and then destroy both keys on my
end.

When the file was accessed and the private key was provided, I would want to
stream the unencrypted file out without ever writing the unencrypted file to
disk.

Any ideas on how to accomplish this within the PHP construct?

Thanks!

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



RE: [PHP] Two-way on-the-fly encryption

2003-11-20 Thread Chris W. Parker
Ray 
on Thursday, November 20, 2003 5:29 AM said:

> Any ideas on how to accomplish this within the PHP construct?

Instead of reinventing the wheel you can just use HTTPS.



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



[PHP] LAMP jobs

2003-11-20 Thread Susan Ator
It seems like this question came up before. Is there a resource for people
looking for jobs working with open source products (LAMP specifically)?

Thanks,

susan

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



Re: [PHP] Avoiding duplicate orders?

2003-11-20 Thread Marek Kilimajer
J J wrote:

What is the simplest way to avoid duplicate order
entry on a form?  Some people aren't patient enough to
wait for the SSL/credit card processing and will click
the submit button two, three, or more times causing
duplicate orders.
Is there a quick way to disable the submit button at
least in javascript? 


If you have any javascript form checks, disable the button just before 
returning true from the onsubmit handler.

Better yet, something quick and
easy that could be done server-side without a lot of
programming like cookies, database flags, etc?
I've thought of a few things (like hidden variables
with an order ID or cookies/flags) but this really
should be a quick fix since it's not a big problem on
the site.
Thanks in advance for any tips or techniques!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Two-way on-the-fly encryption

2003-11-20 Thread Ray
I want to do two-way encryption on a file coming through the web server.  In
this context, I would want to generate a public and private key, encrypt the
file stream (i.e., don't want to write the unencrypted file to disk first
and then encrypt it; I want to encrypt the stream as it comes in) with the
public, send the private to the recipient, and then destroy both keys on my
end.

When the file was accessed and the private key was provided, I would want to
stream the unencrypted file out without ever writing the unencrypted file to
disk.

Any ideas on how to accomplish this within the PHP construct?

Thanks!



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



[PHP] Re: Avoiding duplicate orders?

2003-11-20 Thread pete M
psuedo code

session_start()

if (incoming POST and $_SESSION['in_database'] != 1)
{
insert to DB
$_SESSION['in_database'] = 1
}
pete

J J wrote:

What is the simplest way to avoid duplicate order
entry on a form?  Some people aren't patient enough to
wait for the SSL/credit card processing and will click
the submit button two, three, or more times causing
duplicate orders.
Is there a quick way to disable the submit button at
least in javascript?  Better yet, something quick and
easy that could be done server-side without a lot of
programming like cookies, database flags, etc?
I've thought of a few things (like hidden variables
with an order ID or cookies/flags) but this really
should be a quick fix since it's not a big problem on
the site.
Thanks in advance for any tips or techniques!

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Session vars not echoing?

2003-11-20 Thread pete M
need to issue a

session_start()

at top of page

Pete

Jas wrote:
Not sure why this is happening but I think it has something to do with 
an include statement...
[Server environment]
Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3
register_globalsOnOn
report_memleaksOnOn
safe_modeOffOff
safe_mode_exec_dirno valueno value
Session Support enabled

[Script registering vars - sessions.php]
/* Format Date & Time */
$hour = (date("H:i:s"));
$day = (date("d"));
$date =  (date("F $day, Y"));
/* Register vars */
$_SESSION['date'] = $date;
[Main script - index.php]
session_start()

require 'scripts/sessions.php';

echo $_SESSION['date'];  //This is not showing up in browser?

Any help is appreciated...
Jas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP Encoders

2003-11-20 Thread R. Rajesh Jeba Anbiah
Jerry <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Hi there !
> 
> I am curretly looking for suitbale solutions for encoding PHP scripts
> after developing a couple of comercial applications in PHP.
> 
> Has anybody made any experience with several encoders like IONCUBE,
> SOURCEGUARDIAN, ZEND, etc... so far?

 Did you try http://pobs.mywalhalla.net/ ?

---
 "One who mix sports and patriotism is a barbarian"
Email: rrjanbiah-at-Y!com

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



Re: [PHP] Avoiding duplicate orders?

2003-11-20 Thread Sophie Mattoug
The way I do is, on the result page, to create a variable (for example 
$done) and I put to into the session. So if this variable already 
exists, I don't re-execute the form treatment code.

Hope this helps

--
Cordialement,
---
Sophie Mattoug
Développement web dynamique
[EMAIL PROTECTED]
---
J J wrote:

What is the simplest way to avoid duplicate order
entry on a form?  Some people aren't patient enough to
wait for the SSL/credit card processing and will click
the submit button two, three, or more times causing
duplicate orders.
Is there a quick way to disable the submit button at
least in javascript?  Better yet, something quick and
easy that could be done server-side without a lot of
programming like cookies, database flags, etc?
I've thought of a few things (like hidden variables
with an order ID or cookies/flags) but this really
should be a quick fix since it's not a big problem on
the site.
Thanks in advance for any tips or techniques!

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP-Only Polling Script?

2003-11-20 Thread John Nichel
Rob Adams wrote:
"John Nichel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
For premade scripts, there's always here too...

http://www.phpresourceindex.com



Is this page a joke?  When I go there, I get this message:

Nope, no joke...just not thinking while I type

http://php.resourceindex.com/

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP-Only Polling Script?

2003-11-20 Thread Dan Joseph
Hi,

> Is this page a joke?  When I go there, I get this message:
>
> 
> Active Server Pages error 'ASP 0241'
> CreateObject Exception
>
> /Default.asp
>
> The CreateObject of '(null)' caused exception C005.
> 

Looks ok to me, except last I remmeber, ASP gave you a line number it
crashed on.  Myabe ASP.NET doesn't.  I've never actually seen ASP.NET report
errors to the browser..

-Dan Joseph

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



[PHP] Avoiding duplicate orders?

2003-11-20 Thread J J
What is the simplest way to avoid duplicate order
entry on a form?  Some people aren't patient enough to
wait for the SSL/credit card processing and will click
the submit button two, three, or more times causing
duplicate orders.

Is there a quick way to disable the submit button at
least in javascript?  Better yet, something quick and
easy that could be done server-side without a lot of
programming like cookies, database flags, etc?

I've thought of a few things (like hidden variables
with an order ID or cookies/flags) but this really
should be a quick fix since it's not a big problem on
the site.

Thanks in advance for any tips or techniques!

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: [PHP] PHP-Only Polling Script?

2003-11-20 Thread Rob Adams
"John Nichel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> For premade scripts, there's always here too...
>
> http://www.phpresourceindex.com
>

Is this page a joke?  When I go there, I get this message:


Active Server Pages error 'ASP 0241'
CreateObject Exception

/Default.asp

The CreateObject of '(null)' caused exception C005.




  -- Rob

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



Re: [PHP] Using JavaScript variables in PHP

2003-11-20 Thread John Nichel
Mike Knittel wrote:
How does one go about using a JavaScript variable with PHP code.  I have a
function in JavaScript that takes a single input parameter (ID).  I want to
use this ID variable as the value on the where clause of a database query.
Example:  "select * from somedatabase where field=ID"

Can this be done, and if so how?  I have been unable to figure this out.

Not unless you send a request to the server (reload the page, go to 
another page, etc.).  php runs server side, JavaScript runs client side.

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Using JavaScript variables in PHP

2003-11-20 Thread Mike Migurski
>How does one go about using a JavaScript variable with PHP code.  I have
>a function in JavaScript that takes a single input parameter (ID).  I
>want to use this ID variable as the value on the where clause of a
>database query.
>
>Example:  "select * from somedatabase where field=ID"
>
>Can this be done, and if so how?  I have been unable to figure this out.

Not unless you include the javascript variable in a subsequent GET or POST
request to the server - once your browser renders an HTTP response, PHP's
involvement is long finished.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



RE: [PHP] Re: IE 6 mangling posted code

2003-11-20 Thread Pablo Gosse
David Strencsev wrote:
> You may play with these functions:
> 
> addslashes();
> stripslashes();
> htmlentities();
> html_entity_decode();
> 

Thanks for your help manu and david.  I'm going to attempt converting
the html characters and see if that works, but something also makes me
think this might be a server configuration issue.

The reason I say this is that I've run into this error on my machine,
but when I try it on our academic web server it works fine, and when I
ran a test on my system administrator's machine it worked fine as well.

Now, some time ago I ran into a problem with the uploading of images on
my machine, in that during the upload process the image was somehow
being mangled and the uploaded copy was always a few K larger than the
original, and no longer a valid file.  I ran the test on my system
administrator's machine and it was fine.

These two things make me think it's something in the way my server is
configured.  I'm pretty new to Linux, so I have absolutely no idea what
it might be and will be posting to some Linux and Apache forums to see
if I can pinpoint it.

In the meantime I will try converting the characters before they're
displayed in the textarea for editing and before they're submitted to
the db.

Thanks again guys.

Cheers,
Pablo

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



Re: [PHP] Installing Turck MMcache on win

2003-11-20 Thread Curt Zirzow
* Thus wrote Veress Berci ([EMAIL PROTECTED]):
> Hello
> 
> Curt wrote:
> >php has to run as a mod in order to have mmcache run. Make a php
> I knew this from the start. So I configured Apache (i think i did it right)
> to run php as module.
> I had an "httpd.conf.runphpasmodule" file, and I had renamed it to
> httpd.conf
> 
> >page with the output of phpinfo(). It will tell you if its running
> >in module mode or cgi and also wich php.ini you need to modify.
> 
> I did it, but I can't see any relevant info on it.
> (I'm total newbie)
> Where exactly should I look on the phpinfo page if it's running as cgi or
> mod?

The column in the very first part that says: Server API 
It will say something like IIS Version if its a module or CGI
gateway if its a cgi.

> 
> Maybe i haven't put mmcache info to the right place in php.ini.
> It looks like this:
> 
> ;Windows extensions
> .
> .[snip]
> .
> ;extension=php_snmp.dll
> ;extension=php_sockets.dll
> ;extension=php_sybase_ct.dll
> ;extension=php_xslt.dll
> ;extension=php_yaz.dll
> ;extension=php_zlib.dll
> zend_extension_ts="C:\apache\php\extensions\mmcache.dll"
> 
> Maybe I should change "zend_extension_ts" to "extension?"
> No. I tried it.

hmm.. yea that might be the problem, i've never seen a
zend_extension_ts.

Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
http://zirzow.dyndns.org/html/mlists/

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



[PHP] XML Parsing....

2003-11-20 Thread Scott Fletcher
Hi Everyone!

I'm having a little trouble understanding how exactly to use the XML
parser.  I haven't found the right settings to set up the XML Parser's
option because of no definition of the encoding setting in the XML tags I
received.  So, I'll post the script here and hope to get some feedback on
this...


--snip--
 $data = "";
 //Lots of XML tags goes here but is taken out for shorter
scripting
 $data = "  ";
 //Lots of other XML tags goes here but is taken out for shorter
scripting
 $data = "  ]]>";
 //Lots of other XML tags goes here but is taken out for shorter
scripting
 $data .= "";

 $parser = xml_parser_create('ISO-8859-1');
 xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
 xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
 xml_parse_into_struct($parser, $data, $vals, $index);
 xml_parser_free($parser);
--snip--

The problem here is that I have like two different XML encoding
format

Thanks,
 Scott

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



[PHP] Using JavaScript variables in PHP

2003-11-20 Thread Mike Knittel
How does one go about using a JavaScript variable with PHP code.  I have a
function in JavaScript that takes a single input parameter (ID).  I want to
use this ID variable as the value on the where clause of a database query.

Example:  "select * from somedatabase where field=ID"

Can this be done, and if so how?  I have been unable to figure this out.

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



[PHP] Session vars not echoing?

2003-11-20 Thread Jas
Not sure why this is happening but I think it has something to do with 
an include statement...
[Server environment]
Apache/2.0.47 (Unix) DAV/2 PHP/4.3.3
register_globals	On	On
report_memleaks	On	On
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
Session Support 	enabled

[Script registering vars - sessions.php]
/* Format Date & Time */
$hour = (date("H:i:s"));
$day = (date("d"));
$date =  (date("F $day, Y"));
/* Register vars */
$_SESSION['date'] = $date;
[Main script - index.php]
require 'scripts/sessions.php';
echo $_SESSION['date'];  //This is not showing up in browser?

Any help is appreciated...
Jas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Is there a way to use the strpos() for next string...

2003-11-20 Thread Ford, Mike [LSS]
On 20 November 2003 14:53, Scott Fletcher wrote:

> Hi Everyone!
> 
> Is there a way to get the strpos() to find the next needle in
> the haystack instead of just the 1st one only?  (Where the 1st
> needle is the same string as the next needle)...

Look at the optional 3rd parameter to strpos().

Cheers!

Mike

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

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



Re: [PHP] date question

2003-11-20 Thread Ahbaid Gaffoor
Beautiful,

many thanks

Ahbaid.

Martin Cameron wrote:

$ndays=14;

function get_next_dates($ndays)
{
$today=date("m-d-Y",mktime(0,0,0,date("m"),date("d"),date("Y")));
$forward_date=date("m-d-Y",mktime(0,0,0,date("m"),date("d")+$few_days,date("Y")));
print "$today === $few_days === $forward_date";
for($i=0;$i<$ndays;$i++)
{
$new_days_array[]=date("m-d-Y",mktime(0,0,0,date("m"),date("d")+$i,date("Y")));
}
return($new_days_array);
}
 

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


Re: [PHP] echo or print

2003-11-20 Thread Tom Rogers
Hi,

Friday, November 21, 2003, 12:37:50 AM, you wrote:
JF> when should i use echo ' '; vs. print ' ';


JF> 
JF> Jay Fitzgerald, Design Director
JF> - Certified Professional Webmaster (CPW-A)
JF> - Certified Professional Web Designer (CPWDS-A)
JF> - Certified Professional Web Developer (CPWDV-A)
JF> - Certified E-Commerce Manager (CECM-A)
JF> - Certified Small Business Web Consultant (CWCSB-A)

JF> Bayou Internet - http://www.bayou.com
JF> Toll Free: 888.30.BAYOU (22968)
JF> Vox: 318.338.2034 / Fax: 318.338.2506
JF> E-Mail: [EMAIL PROTECTED]
JF> ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
JF>   


There is no real difference in common usage, print returns true always so you
can use it in weird situations otherwise echo is a tiny bit faster.
You can do stuff like this

if(isset($_GET['name'] && print('DEBUG: received name set to 
'.$_GET['name']."\n")){
  //normal processing here
}

-- 
regards,
Tom

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



RE: [PHP] Why is the php loop, 'for()', so slow????

2003-11-20 Thread Wouter van Vliet
As a substitute for substr, you might want to give a regex a chance.. have
no clue if it's faster, but it might just be.

/^.{2}(.{0,8})/

would be your regex if you want to start at offset THREE and take out a MAX
EIGHT char string (remove the 0 and get ONLY EIGHT char strings). Not sure
if PHP sets $1, $2, .. vars, else give the optional third "Matches" param to
preg_match();

Wouter

> -Oorspronkelijk bericht-
> Van: Scott Fletcher [mailto:[EMAIL PROTECTED]
> Verzonden: donderdag 20 november 2003 15:44
> Aan: [EMAIL PROTECTED]
> Onderwerp: Re: [PHP] Why is the php loop, 'for()', so slow
>
>
> Well, should have make one long string to the $res_str variable a lot
> shorter.  :-)
>
> It turned out that the for() loop isn't the slow part when you mentioned
> about substr().  I tried out the while() loop and it is pretty
> much the same
> when the loop take over 5 minutes.  So, it now seem to have to do with
> substr() function.  Yea, I'm not sure what hte best substitute of it would
> be.  In other branches off of this posting, someone said about using the
> strpos().  I'm willing to give this a try but I have problem with this
> because I have two "" tags in it and I want to use
> both, not
> just first one.
>
> Scott
>
> "Chris W. Parker" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Scott Fletcher 
> on Wednesday, November 19, 2003 1:12 PM said:
>
> > function CBC_XML_BreakUp(&$strResponse_XML, &$strResponse_HTML)
> >
> > {
>
> [snip]
>
> Wow I didn't think you were going to post your whole program. :0
>
> 1. Are you sure the for() loop is the slow part?
>
> 2. As someone already suggested, calculating the sizeof() outside of the
> loop should help a lot. Another enhancement is changing your for() to
> while(). (This is a small enhancement but makes a bigger difference as
> your iterations increase.)
>
> REGULAR for() loop construct:
>
> $iMax = 99;
>
> for($iCnt = 0; $iCnt < $iMax; $iCnt++)
> {
> }
>
> OPTIMIZED:
>
> $iMax = 99;
> $iCnt = -1;
>
> while(++$iCnt < $iMax)
> {
> }
>
> Like I said it's only slightly faster, but might make a difference
> depending on your number of iterations.
>
> 3. I think what may be slowing you down is your substr() calls. Maybe
> there is a substitute function that is faster? (I don't have any ideas
> unfortunately.)
>
>
> Let us know if you figure something out.
>
> HTH,
> Chris.
> --
> Don't like reformatting your Outlook replies? Now there's relief!
> http://home.in.tum.de/~jain/software/outlook-quotefix/
>
> --
> 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



  1   2   >