[PHP] strange behaviour of unset()

2002-07-08 Thread Liviu Andrei

Hi everybody!

I just switched from 4.0.6 to 4.2.1 (register_globals is ON) and I noticed 
that unset() is not working properly. Specifically, if I use unset($a) in 
a page, $a becomes not set in THAT page, but for the next pages (using 
sessions) $a gets back at its value. Here is the sample:

page1:

session_start();
session_register(a);
$a=toto;
echo $a;

OUTPUT: toto

page 2:

session_start();
unset($a);
echo $a;

OUTPUT:
(nothing)

page 3:

session_start();
echo $a;

OUTPUT: toto


Have I done anything wrong? Have the rules changed recently? The manual 
still reads:

unset() destroys the specified variables

Thanks!



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] ini_set() broken?

2002-07-08 Thread Philip Olson


You cannot set register_globals at runtime via 
ini_set().  The documentation goes off the PHP4 
source which is, to put it simply, a little wrong.  
The PHP4 source says register_globals is PHP_INI_ALL 
when in the real world it isn't.  .htaccess 
is as close as you'll get.

The ini_set() docs are autogenerated and this issue 
is being looked into.  The correct docs on this are 
now in phpdoc CVS and will show up soon.

In short, don't attempt to set register_globals 
at runtime as explained by a few in this thread, 
it won't fully work as expected.

Regards,
Philip Olson




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




Re: [PHP] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf

Well, you can set it at runtime, it just won't do what you might expect.
That doesn't mean that it may not be useful to be able to set it at
runtime.  If, for example, you have register_globals off and you write an
auto-prepend script, or even just a normal snippet of code that you insert
into some other app at the beginning that emulates register_globals, then
you may want to set register_globals = on at runtime so that any
subsequent checks by the app will behave correctly.

-Rasmus

On Mon, 8 Jul 2002, Philip Olson wrote:


 You cannot set register_globals at runtime via
 ini_set().  The documentation goes off the PHP4
 source which is, to put it simply, a little wrong.
 The PHP4 source says register_globals is PHP_INI_ALL
 when in the real world it isn't.  .htaccess
 is as close as you'll get.

 The ini_set() docs are autogenerated and this issue
 is being looked into.  The correct docs on this are
 now in phpdoc CVS and will show up soon.

 In short, don't attempt to set register_globals
 at runtime as explained by a few in this thread,
 it won't fully work as expected.

 Regards,
 Philip Olson




 --
 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] Software on web Accessing mySQL/PHP

2002-07-08 Thread Thomas Edison Jr.

Hi,

Basically we have created a Software in Visual Basic.
Now the software uses mySQL on the internet as
Backend. However, our server does not allow Remote
Host Connection, which means we cannot access our
mySQL Database on the Internet by our Software on a
local client. We need the mySQL Database on the
Internet because basically everything will be
available on a website later through PHP Pages.

Now, my problem is how to connect to my mySQL DB on
the Internet, via my Software, when my Server Company
doesn't allow Remote Host Connection to mySQL.

What is suggested to me is to place the Software on
the Internet. I have no clue how to do that. Because
if i place an .exe file on the net, it will just start
downloading instead of running. 

How then can i accomplish this? 
The software feeds in Data in the mySQL DB on the
internet, and then the PHP pages access the mySQL DB
to show data to users on the Website. It's something
like that. The software involves a lot of processing,
decryption, conversion etc. to convert a .dat data
into usable mySQL Tables Data.

Hope somebody can help.
Thanks,

T. Edison Jr.



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




[PHP] php +newlines+mysql

2002-07-08 Thread adi

I have a problem in php page:
 i want to insert into mysql database value $string with newlines:
 $string=-line1\n -line2 \n-line3;

  $result2 = db_query(update table1 set column1= '$string' where ID =
'$IDcurent') or db_die();
When i try to view in a textarea control the new value from column1, the
newlines
disappear!

ps.column 1 have type text or varchar(100)
Is a problem of type?

tx in advance for any help
adi




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




[PHP] Little php execution question.

2002-07-08 Thread Latex Master

Hello php-general,

  I finally finish my work on one of the projects. I got a question
  how PHP executes a script.
  Let's say i got a little script but it takes him a long time to work
  (don't blame me please) If a user stops loading page of will close
  the window. Will Script continue working till the end or php will
  kill that process?

-- 
Best regards,
 Latex  mailto:[EMAIL PROTECTED]


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




[PHP] Cannot start Apache

2002-07-08 Thread Alexander Skwar

Hallo.

I thought that I had PHP 4.2.1 compiled just fine on SuSE 7.2, 
however when I start Apache 1.3.19, it seg faults.

I compiled PHP like this:

CFLAGS=-O2 -m486 -fno-strength-reduce -fPIC -DHAVE_LIBDL=1 \
-I'/usr/include/mysql' -I/usr/include/gd \
LDFLAGS=\
EXTRA_LIBS=-L'/usr/lib/mysql' -lmysqlclient -lz -lcrypt -lnsl \
-lm -L/usr/X11R6/lib/ -lpng -lXpm -lssl \
./configure i386-suse-linux --prefix=/usr/share
--datadir=/usr/share/php --bindir=/usr/bin --libdir=/usr/share
--includedir=/usr/include --with-config-file-path=/etc
--with-exec-dir=/usr/lib/php/bin --with-mm --enable-versioning
--enable-yp --enable-bcmath --enable-trans-sid
--enable-inline-optimization --enable-track-vars --enable-magic-quotes
--enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-shmop --enable-calendar --enable-mbstring
--enable-mbstr-enc-trans --enable-exif --enable-memory-limit
--enable-wddx --enable-filepro --enable-dbase --enable-ctype
--disable-debug --enable-force-cgi-redirect --enable-discard-path
--enable-sigchild --with-pear=/usr/share/php/pear --with-pgsql=/usr
--with-mysql=/usr --with-imap=yes --with-imap --with-imap-ssl
--with-curl --enable-cli --with-mhash --with-ming --with-recode
--with-iconv --with-dom --with-dom-xslt --with-dom-exslt --with-gd=yes
--enable-gd-native-ttf --enable-gd-imgstrttf --with-tiff-dir=/usr
--with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6
--with-ttf --with-freetype --with-freetype-dir=/usr/include/freetype2
--with-t1lib --with-zlib=yes --with-bz2 --with-gmp --with-mcal=/usr
--with-sablot --with-ftp --enable-ftp --with-gdbm --with-ndbm
--with-qtdom=/usr/lib/qt --with-openssl --with-gettext --with-mcrypt
--enable-dbx --enable-mbregex --with-apxs=/usr/sbin/apxs
--with-pgsql=/usr --with-mysql=/usr --with-imap=yes
--with-imap --with-imap-ssl --with-curl --enable-cli --with-mhash
--with-ming --with-recode --with-iconv --with-dom --with-dom-xslt
--with-dom-exslt --with-gd=yes --enable-gd-native-ttf
--enable-gd-imgstrttf --with-tiff-dir=/usr --with-jpeg-dir=/usr
--with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-ttf --with-freetype
--with-freetype-dir=/usr/include/freetype2 --with-t1lib --with-zlib=yes
--with-bz2 --with-gmp --with-mcal=/usr --with-sablot --with-ftp
--enable-ftp --with-gdbm --with-ndbm --with-qtdom=/usr/lib/qt
--with-openssl --with-gettext --with-mcrypt

As I said, when I restart Apache, it segfaults.  Here are the last
few lines of a strace (the complete strace output is available at
http://digitalprojects.com/php-strace.txt):

open(./php.ini, O_RDONLY|O_LARGEFILE) = 5
getcwd(/etc, 4095)= 5
lstat64(/etc, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64(/etc/php.ini, {st_mode=S_IFREG|0644, st_size=28100, ...}) = 0
brk(0x8379000)  = 0x8379000
ioctl(5, TCGETS, 0xb3bc)= -1 ENOTTY (Inappropriate ioctl for
device)
fstat64(5, {st_mode=S_IFREG|0644, st_size=28100, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40e6a000
read(5, [PHP]\n; $Id: php.ini-dist,v 1.78..., 8192) = 8192
read(5, desired error\n; reporting level\n..., 8192) = 8192
read(5, dll\n;extension=php_ifx.dll\n;exte..., 8192) = 8192
brk(0x837a000)  = 0x837a000
brk(0x837b000)  = 0x837b000
read(5, ession.entropy_length = 16\n\n;ses..., 8192) = 3524
read(5, , 4096)   = 0
brk(0x837c000)  = 0x837c000
read(5, , 8192)   = 0
ioctl(5, TCGETS, 0xbfffe7f8)= -1 ENOTTY (Inappropriate ioctl for
device)
close(5)= 0
munmap(0x40e6a000, 4096)= 0
brk(0x837d000)  = 0x837d000
brk(0x837e000)  = 0x837e000
brk(0x837f000)  = 0x837f000
brk(0x838)  = 0x838
brk(0x8381000)  = 0x8381000
brk(0x8382000)  = 0x8382000
brk(0x8383000)  = 0x8383000
brk(0x8384000)  = 0x8384000
brk(0x8385000)  = 0x8385000
brk(0x8386000)  = 0x8386000
brk(0x8387000)  = 0x8387000
brk(0x8388000)  = 0x8388000
brk(0x8389000)  = 0x8389000
brk(0x838a000)  = 0x838a000
brk(0x838b000)  = 0x838b000
brk(0x838c000)  = 0x838c000
brk(0x838d000)  = 0x838d000
brk(0x838e000)  = 0x838e000
brk(0x838f000)  = 0x838f000
brk(0x839)  = 0x839
brk(0x8391000)  = 0x8391000
brk(0x8392000)  = 0x8392000
brk(0x8393000)  = 0x8393000
open(/etc/ld.so.cache, O_RDONLY)  = 5
fstat64(5, {st_mode=S_IFREG|0644, 

RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread César Aracena

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 08, 2002 2:31 AM
 To: Peter J. Schoenster
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] is their a jobs mailing list?
 
 Job postings are fine on this list.  Some people will invariably
gripe,
 but overall people like to see that there are jobs out there involving
 PHP.  And it they don't, well tough.  None of the people who help run
this
 list, including myself have any problems with them.
 
 -Rasmus

[César L. Aracena] Just as a shot in the dark... is it possible for
www.php.net being the sure stop for PHP developers to make available a
new list called job-posting or something like that?

Just a though I had... somehow organized by countries/states? Or maybe
make available a list (i.e. the Announcements list) to offers from PHP
developers?

I mean, instead of seeing many people *HUNTING* for developers, make
them go there and search for the place (i.e. HOUSTON, TX).


 On Sun, 7 Jul 2002, Peter J. Schoenster wrote:
 
  Hi,
 
  I was here first:
 
 

http://www.php.net/manual/en/faq.mailinglist.php#faq.mailinglist.guideli
ne
 
   Before you post to the list please have a look in this FAQ
 
  But I found nothing about a jobs mailing list. I'm really a Perl
 programmer and
  we have jobs.perl.org which has a list which does a really good job.
 
  A person from Houston, TX asked me if I knew of any PHP people in
 Houston.
  I advertise on Google and Overture as a developer for hire.
 
  I don't sugget he post to this list as I'm not sure of the etiquette
and
 I've never
  seen jobs posted to this list; I know they are accepted heartily on
the
  mod_perl list.
 
  Anything simple but effective like this site for PHP?
 
  http://jobs.perl.org/
 
  Peter
 
 
 
 
  --
  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] is their a jobs mailing list?

2002-07-08 Thread Brian McGarvie

I think a job's list would be good too so people can target only those who wish to 
undertake a contract/new position, and also for people to post that they are 
available... that or have an 'independant' site or get one of us to do a subsite on 
php .net :)

I'll do it if it's something that'd be of interest to people...

 -Original Message-
 From: César Aracena [mailto:[EMAIL PROTECTED]]
 Sent: 08 July 2002 9:28 AM
 To: PHP General List
 Subject: RE: [PHP] is their a jobs mailing list?
 
 
  -Original Message-
  From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 08, 2002 2:31 AM
  To: Peter J. Schoenster
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] is their a jobs mailing list?
  
  Job postings are fine on this list.  Some people will invariably
 gripe,
  but overall people like to see that there are jobs out 
 there involving
  PHP.  And it they don't, well tough.  None of the people 
 who help run
 this
  list, including myself have any problems with them.
  
  -Rasmus
 
 [César L. Aracena] Just as a shot in the dark... is it possible for
 www.php.net being the sure stop for PHP developers to make available a
 new list called job-posting or something like that?
 
 Just a though I had... somehow organized by countries/states? Or maybe
 make available a list (i.e. the Announcements list) to offers from PHP
 developers?
 
 I mean, instead of seeing many people *HUNTING* for developers, make
 them go there and search for the place (i.e. HOUSTON, TX).
 
 
  On Sun, 7 Jul 2002, Peter J. Schoenster wrote:
  
   Hi,
  
   I was here first:
  
  
 
 http://www.php.net/manual/en/faq.mailinglist.php#faq.mailingli
st.guideli
ne
 
   Before you post to the list please have a look in this FAQ
 
  But I found nothing about a jobs mailing list. I'm really a Perl
 programmer and
  we have jobs.perl.org which has a list which does a really good job.
 
  A person from Houston, TX asked me if I knew of any PHP people in
 Houston.
  I advertise on Google and Overture as a developer for hire.
 
  I don't sugget he post to this list as I'm not sure of the etiquette
and
 I've never
  seen jobs posted to this list; I know they are accepted heartily on
the
  mod_perl list.
 
  Anything simple but effective like this site for PHP?
 
  http://jobs.perl.org/
 
  Peter
 
 
 
 
  --
  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


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




RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread Dan Hardiker

I have no idea if this of any use to you guys ... but www.jobserv.co.uk
has a load of IT jobs - but AFAIK they are all for mainland UK. Will be
helpful for brits in any case. You might find a link to their continental
/ american / australian counterparts.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



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




[PHP] A problem in mysql_fetch_array

2002-07-08 Thread Jimmy Lam

I have insert some text with space to mysql DB with varchar()

When I use mysql_fetch_array function to retrieve the data from DB . I found only the 
first session text can be shown . It means if any space there . It will split like 
session by session. for example. my DB have a text Hello World , It can retrieve 
only HELLO by using mysql_fetch_array . 

could anyone help me  ? thanks ..





RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread Balaji Ankem

Will it be not possible to apply for other countries jobs?

-Original Message-
From: Dan Hardiker [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 08, 2002 2:12 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] is their a jobs mailing list?


I have no idea if this of any use to you guys ... but www.jobserv.co.uk
has a load of IT jobs - but AFAIK they are all for mainland UK. Will be
helpful for brits in any case. You might find a link to their
continental / american / australian counterparts.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



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



**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***



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


RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread César Aracena

Well, I am interested as long as the Masters let put this *JOB* site
under www.php.net (would be more useful). If you or anybody else is
willing to do such a site, I would like very much to get involved for
learning and contribution reasons.

C.

 -Original Message-
 From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 08, 2002 5:37 AM
 To: PHP General List
 Subject: RE: [PHP] is their a jobs mailing list?
 
 I think a job's list would be good too so people can target only those
who
 wish to undertake a contract/new position, and also for people to post
 that they are available... that or have an 'independant' site or get
one
 of us to do a subsite on php .net :)
 
 
 I'll do it if it's something that'd be of interest to people...
 
  -Original Message-
  From: César Aracena [mailto:[EMAIL PROTECTED]]
  Sent: 08 July 2002 9:28 AM
  To: PHP General List
  Subject: RE: [PHP] is their a jobs mailing list?
 
 
   -Original Message-
   From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 08, 2002 2:31 AM
   To: Peter J. Schoenster
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] is their a jobs mailing list?
  
   Job postings are fine on this list.  Some people will invariably
  gripe,
   but overall people like to see that there are jobs out
  there involving
   PHP.  And it they don't, well tough.  None of the people
  who help run
  this
   list, including myself have any problems with them.
  
   -Rasmus
 
  [César L. Aracena] Just as a shot in the dark... is it possible for
  www.php.net being the sure stop for PHP developers to make available
a
  new list called job-posting or something like that?
 
  Just a though I had... somehow organized by countries/states? Or
maybe
  make available a list (i.e. the Announcements list) to offers from
PHP
  developers?
 
  I mean, instead of seeing many people *HUNTING* for developers, make
  them go there and search for the place (i.e. HOUSTON, TX).
 
 
   On Sun, 7 Jul 2002, Peter J. Schoenster wrote:
  
Hi,
   
I was here first:
   
   
  
  http://www.php.net/manual/en/faq.mailinglist.php#faq.mailingli
 st.guideli
 ne
  
Before you post to the list please have a look in this FAQ
  
   But I found nothing about a jobs mailing list. I'm really a Perl
  programmer and
   we have jobs.perl.org which has a list which does a really good
job.
  
   A person from Houston, TX asked me if I knew of any PHP people in
  Houston.
   I advertise on Google and Overture as a developer for hire.
  
   I don't sugget he post to this list as I'm not sure of the
etiquette
 and
  I've never
   seen jobs posted to this list; I know they are accepted heartily
on
 the
   mod_perl list.
  
   Anything simple but effective like this site for PHP?
  
   http://jobs.perl.org/
  
   Peter
  
  
  
  
   --
   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
 
 
 --
 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[2]: [PHP] is their a jobs mailing list?

2002-07-08 Thread Latex Master

Hello PHP,

  As for me I can provide a server platform for it :) and even a
  domain name. Like phpjobs.com.ru if it will be suitable for all.
Those domains are free for Russian programmers :)


 CUT 



-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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




RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread Brian McGarvie

Yeh sure...

I have worked on a recruitment site for a UK agency.

 -Original Message-
 From: César Aracena [mailto:[EMAIL PROTECTED]]
 Sent: 08 July 2002 9:47 AM
 To: Brian McGarvie; 'PHP General List'
 Subject: RE: [PHP] is their a jobs mailing list?
 
 
 Well, I am interested as long as the Masters let put this *JOB* site
 under www.php.net (would be more useful). If you or anybody else is
 willing to do such a site, I would like very much to get involved for
 learning and contribution reasons.
 
 C.
 
  -Original Message-
  From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 08, 2002 5:37 AM
  To: PHP General List
  Subject: RE: [PHP] is their a jobs mailing list?
  
  I think a job's list would be good too so people can target 
 only those
 who
  wish to undertake a contract/new position, and also for 
 people to post
  that they are available... that or have an 'independant' site or get
 one
  of us to do a subsite on php .net :)
  
  
  I'll do it if it's something that'd be of interest to people...
  
   -Original Message-
   From: César Aracena [mailto:[EMAIL PROTECTED]]
   Sent: 08 July 2002 9:28 AM
   To: PHP General List
   Subject: RE: [PHP] is their a jobs mailing list?
  
  
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 2:31 AM
To: Peter J. Schoenster
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] is their a jobs mailing list?
   
Job postings are fine on this list.  Some people will invariably
   gripe,
but overall people like to see that there are jobs out
   there involving
PHP.  And it they don't, well tough.  None of the people
   who help run
   this
list, including myself have any problems with them.
   
-Rasmus
  
   [César L. Aracena] Just as a shot in the dark... is it 
 possible for
   www.php.net being the sure stop for PHP developers to 
 make available
 a
   new list called job-posting or something like that?
  
   Just a though I had... somehow organized by countries/states? Or
 maybe
   make available a list (i.e. the Announcements list) to offers from
 PHP
   developers?
  
   I mean, instead of seeing many people *HUNTING* for 
 developers, make
   them go there and search for the place (i.e. HOUSTON, TX).
  
  
On Sun, 7 Jul 2002, Peter J. Schoenster wrote:
   
 Hi,

 I was here first:


   
   http://www.php.net/manual/en/faq.mailinglist.php#faq.mailingli
  st.guideli
  ne
   
 Before you post to the list please have a look in this FAQ
   
But I found nothing about a jobs mailing list. I'm really a Perl
   programmer and
we have jobs.perl.org which has a list which does a really good
 job.
   
A person from Houston, TX asked me if I knew of any PHP 
 people in
   Houston.
I advertise on Google and Overture as a developer for hire.
   
I don't sugget he post to this list as I'm not sure of the
 etiquette
  and
   I've never
seen jobs posted to this list; I know they are accepted heartily
 on
  the
mod_perl list.
   
Anything simple but effective like this site for PHP?
   
http://jobs.perl.org/
   
Peter
   
   
   
   
--
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
  
  
  --
  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] HTTPS vs. HTTP ?

2002-07-08 Thread Chris Hewitt


Chris Shiflett wrote:


 I think I'm going to compile all of my SSL explanations into a more 
 clear and informative explanation and post it on the Web somewhere. 

Yes please.

Chris


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




[PHP] add to basket

2002-07-08 Thread Wilbert Enserink

Hi all,


What's the best way to implement functions like 'add to basket' or 'add to wishlist' 
and so on.

I mean: you are on a page with detail information about a product. If the user clicks 
the link for 'add to basket' I have to perform a piece of script and then go back to 
the detail page of the given product. But clicking on this link leads me away form the 
page...

I was thinking of using $HTTP_REFERER i the ad_to_basket.php page in order to 
retrieve the last url, but now I don't know how to go back to this detailpage, is 
there a php command for this, or is my approach totally wrong??

Any comments would be appreciated,
regards. 

Wilbert Enserink

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


Re: [PHP] strange behaviour of unset()

2002-07-08 Thread John Legg

Hi Liviu

You also need to unregister the session var using session_unregister - unset
will just unset the global.

http://www.php.net/manual/en/function.session-unregister.php

Rgds

John

- Original Message -
From: Liviu Andrei [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 7:47 AM
Subject: [PHP] strange behaviour of unset()


 Hi everybody!

 I just switched from 4.0.6 to 4.2.1 (register_globals is ON) and I noticed
 that unset() is not working properly. Specifically, if I use unset($a)
in
 a page, $a becomes not set in THAT page, but for the next pages (using
 sessions) $a gets back at its value. Here is the sample:

 page1:

 session_start();
 session_register(a);
 $a=toto;
 echo $a;

 OUTPUT: toto

 page 2:

 session_start();
 unset($a);
 echo $a;

 OUTPUT:
 (nothing)

 page 3:

 session_start();
 echo $a;

 OUTPUT: toto


 Have I done anything wrong? Have the rules changed recently? The manual
 still reads:

 unset() destroys the specified variables

 Thanks!



 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx


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




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




Re: [PHP] is their a jobs mailing list?

2002-07-08 Thread Chris Hewitt

As not all work involving PHP need be on a customer's site (the type of 
work that agencies deal with), I'd like to suggest that the site is 
flexible enough to offer PHP work in the broader sense, not just 
on-site contract/employment. E.g. an end customer can post that they 
need a particular piece of work done and ask for tenders/interested people.

Chris

Brian McGarvie wrote:

Yeh sure...

I have worked on a recruitment site for a UK agency.



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




RE: [PHP] is their a jobs mailing list?

2002-07-08 Thread Brian McGarvie

Yes... I agree...

I would like formyself and anyothers interested if this was to go-ahead... develop 
similar to but not as deep as and more importantly FREE version of elance or something 
like that...

Can anyone from PHP let us (this thread) know if this is a viable prospect?

 -Original Message-
 From: Chris Hewitt [mailto:[EMAIL PROTECTED]]
 Sent: 08 July 2002 10:42 AM
 To: PHP General List
 Subject: Re: [PHP] is their a jobs mailing list?
 
 
 As not all work involving PHP need be on a customer's site 
 (the type of 
 work that agencies deal with), I'd like to suggest that the site is 
 flexible enough to offer PHP work in the broader sense, not just 
 on-site contract/employment. E.g. an end customer can post that they 
 need a particular piece of work done and ask for 
 tenders/interested people.
 
 Chris
 
 Brian McGarvie wrote:
 
 Yeh sure...
 
 I have worked on a recruitment site for a UK agency.
 
 
 
 -- 
 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] A problem in mysql_fetch_array

2002-07-08 Thread Jason Wong

Jimmy Lam said:
 I have insert some text with space to mysql DB with varchar()

 When I use mysql_fetch_array function to retrieve the data from DB . I
 found only the first session text can be shown . It means if any space
 there . It will split like session by session. for example. my DB have a
 text Hello World , It can retrieve only HELLO by using
 mysql_fetch_array .

Whenever you insert data into a database you need to escape any special
characters. As you're using MySQL, simply using addslashes() on your data
before inserting them would do the trick.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk



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




Re: [PHP] in the meantime___is their a jobs mailing list?

2002-07-08 Thread roger

in the meantime you could may be use my PHP forum at :
http://www.cyberdistributeur.com/yabbse/index.php
as the gathering place for php job posting, just an offer...
up to you to use it or not, i still have some bandwith left
Roger Garin-Michaud
from Saint-Priest near Lyon, France
http://www.cyberdistributeur.com
- Original Message -
From: Brian McGarvie [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 10:37 AM
Subject: RE: [PHP] is their a jobs mailing list?


I think a job's list would be good too so people can target only those who
wish to undertake a contract/new position, and also for people to post that
they are available... that or have an 'independant' site or get one of us to
do a subsite on php .net :)

I'll do it if it's something that'd be of interest to people...



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




Re: [PHP] add to basket

2002-07-08 Thread Justin French

I wouldn't rely on HTTP_REFERER at all.. some user agents don't set it.

For things that need to revert back to a certain URL after a few tasks have
been performed (eg login, email page to a friend, add to cart, add to
wishlist, etc etc).

To do this, I use PHP_SELF ($_SERVER['PHP_SELF'] in PHP = 4.1 I believe),
along with any current query string ($_GET), to establish a $ref var which
is essentially a URL that represents the page in it's current state, eg:

page.php?id=45color=blue

I base64() encode it (so that it can be carried around in URLs without
messing up other GET variables on subsequent pages), and then it's ready to
ship around.

Basically, if someone wants to login, they click on my login link which
looks like:

A HREF=login.php?ref=?=$ref?login/a


login.php looks for, and carries around the $ref variable untill the login
process in complete (could be a few pages, due to errors, etc), then once
the user is logged in successfully, uses header(Location: $ref) to send
the user back to where they were.


So, in short, before going to your add to cart script, make note of your
state (where you are -- script name and query string), carry this around as
a var in the URL until you're ready to go back to that page and continue.


I do this on every site, but with more features (I've basically got a
stack of things that need to be done).


Good luck!


Justin French


on 08/07/02 7:30 PM, Wilbert Enserink ([EMAIL PROTECTED]) wrote:

 Hi all,
 
 
 What's the best way to implement functions like 'add to basket' or 'add to
 wishlist' and so on.
 
 I mean: you are on a page with detail information about a product. If the user
 clicks the link for 'add to basket' I have to perform a piece of script and
 then go back to the detail page of the given product. But clicking on this
 link leads me away form the page...
 
 I was thinking of using $HTTP_REFERER i the ad_to_basket.php page in order
 to retrieve the last url, but now I don't know how to go back to this
 detailpage, is there a php command for this, or is my approach totally wrong??
 
 Any comments would be appreciated,
 regards. 
 
 Wilbert Enserink
 
 -
 Pas de Deux
 Van Mierisstraat 25
 2526 NM Den Haag
 tel 070 4450855
 fax 070 4450852
 http://www.pdd.nl
 [EMAIL PROTECTED]
 -


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




[PHP] Authentication

2002-07-08 Thread Anthony Rodriguez

Dear Richard,

Again thank you for your reply. I'm sorry to keep bothering you. Please 
tell me when to stop.

Let me explain what I'm trying to do and maybe you'll point me in the right 
direction.

I'm developing a paid Web site for business courses. Some pages will be 
available to all visitors (e.g. the Home page). Other pages will be 
available to paid visitors. The usernames, passwords, and courses paid 
for will be stored in a MySQL table. One of the pages will be a form to ask 
a user for his/her username, password, and course paid for. The form will 
be sent to a PHP script that validates the responses. I' know how to do 
this. In that PHP script I'd like to create a session variable (i.e.: the 
course #) that would be used to validate each page of the course.

At the top of each course page (PHP script) there would be an if statement 
(if course # equals session variable display page, else go elsewhere).

Can you help?

Thank you!

Tony



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




Re: [PHP] Authentication

2002-07-08 Thread Justin French

Have a look at Kevin Yank's article on sitepoint.com called something like
restricting page access with php and mysql.

It formed the basis of my user and session management.

Basically, you should be re-checking your username and password on every
page, so it shouldn't be too hard to extend this to check for which course
numbers they've paid for.  You'll also need to extend it so that some pages
are not restricted (eg home), but still maintain/carry the session.

I guess what I'm saying is to keep as much data as possible in the database,
rather than in sessions, because sessions, cookies etc etc can all be
spoofed or hijacked.

So at the top of each page, you're checking:

- if the username and password match the database
- if the course # requested has been paid for

If yes, then show page, else tell 'em to go away :)


That's what I'd be doing... otherwise, you've asked how to assign a variable
to a session, pretty much.

$_SESSION['coursepaidfor'] = 45;


Which should be pretty easy to compare.



Justin French



on 08/07/02 7:20 PM, Anthony Rodriguez ([EMAIL PROTECTED]) wrote:

 Dear Richard,
 
 Again thank you for your reply. I'm sorry to keep bothering you. Please
 tell me when to stop.
 
 Let me explain what I'm trying to do and maybe you'll point me in the right
 direction.
 
 I'm developing a paid Web site for business courses. Some pages will be
 available to all visitors (e.g. the Home page). Other pages will be
 available to paid visitors. The usernames, passwords, and courses paid
 for will be stored in a MySQL table. One of the pages will be a form to ask
 a user for his/her username, password, and course paid for. The form will
 be sent to a PHP script that validates the responses. I' know how to do
 this. In that PHP script I'd like to create a session variable (i.e.: the
 course #) that would be used to validate each page of the course.
 
 At the top of each course page (PHP script) there would be an if statement
 (if course # equals session variable display page, else go elsewhere).
 
 Can you help?
 
 Thank you!
 
 Tony
 
 


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




[PHP] getting the IP address off a visitor

2002-07-08 Thread Sebastian Marcu

Hi there,

I am new to PHP and need some help.
I was wondering if there is a way to get hold of the IP address of a site
visitor with PHP. I'm trying to develop an interaction where the server
would recognise a new visitor from a returning visitor via the IP address.

Regards,


Sebastian





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




[PHP] regex for emoticon codes

2002-07-08 Thread Roger Thomas

i have something like 
$str = sometext sometext [emoticon01] sometext [emoticon23] sometext;

i would like to use regex to replace those codes into:
sometext sometext /images/emot/01.gif sometext /images/emot/23.gif sometext

all numerics after the code emoticon consisted of exactly 2 digits; and they
are in the range from emoticon01 to emoticon30.

i have spent the whole day starring at my crt and reading manpages plus
examples. i achieved nothing but sore eyes.

i would GREATLY-GREATLY appreciate if someone could gimme a code snippet on how
to this sorta thing.

best rgds.
roger



__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: [PHP] getting the IP address off a visitor

2002-07-08 Thread Justin French

Hi,

Not a good idea.

1. in the case of most dial-up users with an ISP, the IP address is usually
dynamically assigned, so next time they dial-up (or re-connect) they will
more than likely have a different IP address.

2. in the many cases of computers with a static IP (cable/ADSL/etc), the IP
address does not necessarily represent a user... think about shared
computers in families, in libraries, corporations, net cafe's, etc.

3. Data storage -- eeek! If you get 1000 visitors with upto 15 bytes
(nnn.nnn.nnn.nnn) each, that's 15k of IP address' you have to search through
constantly, without any real way to make it quicker (eg indexing).  That may
not sound so bad, but perhaps when you reach 3 visitors, it's now upto
450k. Yuk.


Typically, return visitors are recognised with a cookie on the browser,
which definitely takes care of problem #3... of course it doesn't help with
problem #2 (shared computers).


Good luck,

Justin French


on 05/07/02 2:00 AM, Sebastian Marcu ([EMAIL PROTECTED]) wrote:

 Hi there,
 
 I am new to PHP and need some help.
 I was wondering if there is a way to get hold of the IP address of a site
 visitor with PHP. I'm trying to develop an interaction where the server
 would recognise a new visitor from a returning visitor via the IP address.
 
 Regards,
 
 
 Sebastian
 
 
 
 


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




Re: [PHP] regex for emoticon codes

2002-07-08 Thread John Legg

Hi Roger

Try this:

$str = sometext sometext [emoticon01] sometext [emoticon23] sometext;

$new_str = preg_replace(/\[emoticon(\d\d)\]/, /image/emot/\\1.gif,
$str);

print $new_str;

Seems to work?

Rgds

John

- Original Message -
From: Roger Thomas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 11:41 AM
Subject: [PHP] regex for emoticon codes


 i have something like
 $str = sometext sometext [emoticon01] sometext [emoticon23] sometext;

 i would like to use regex to replace those codes into:
 sometext sometext /images/emot/01.gif sometext /images/emot/23.gif
sometext

 all numerics after the code emoticon consisted of exactly 2 digits; and
they
 are in the range from emoticon01 to emoticon30.

 i have spent the whole day starring at my crt and reading manpages plus
 examples. i achieved nothing but sore eyes.

 i would GREATLY-GREATLY appreciate if someone could gimme a code snippet
on how
 to this sorta thing.

 best rgds.
 roger



 __
 Do You Yahoo!?
 Sign up for SBC Yahoo! Dial - First Month Free
 http://sbc.yahoo.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] Session variables

2002-07-08 Thread Steve Fitzgerald

I am designing a form using sessions in which the user inputs their
details on page 1 and after submitting they are directed to page 2 for
confirmation. They then have the option of editing their input (ie they
are returned to page 1) where their previous input is reflected in the
form fields by
value ='?php echo $var ?'
This works fine except if the input type is a drop down box, in which
case the default option is shown. Is there any way around this? How
can I show the user their previous choice in these boxes?
Any insights would be appreciated.
Steve


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




RE: [PHP] Session variables

2002-07-08 Thread Rudolf Visagie

Generate a select structure dynamically with PHP, something like this:

?
$OptionValue[0] = something 1;
$OptionValue[1] = something 2;
$OptionValue[2] = something 3;

$Option[0] = List Option 1;
$Option[1] = List Option 2;
$Option[2] = List Option 3;

function GenerateSelect ($Name, $OptionValue, $Option, $SelectedValue) {

/*
The Select function writes an HTML SELECT statement.
$OptionValue = array with option values
$Option = array with the option wording in the pull down
menu
$SelectedValue = the option value that is currently selected
by the user
*/

echo SELECT name='.$Name.' SIZE='1';
for ($i = 0; $i = count($OptionValue) - 1; $i++) {
if ($SelectedValue !=   $OptionValue[$i] ==
$SelectedValue) {
echo OPTION VALUE='.$OptionValue[$i].'
SELECTED.$Option[$i]./OPTION;
} else {
echo OPTION
VALUE='.$OptionValue[$i].'.$Option[$i]./OPTION;
}
}
echo /SELECT;
return 0;
}
?
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FF text=#00
form name=form1 method=post action=test.php
/form
/body
/html
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#FF text=#00
form name=form1 method=post action=
?
echo You chose .$MyList.br;
GenerateSelect (MyList, $OptionValue, $Option, $MyList)
?
br
input type=submit name=Submit value=Submit
/form
/body
/html

Regards

Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
mailto:[EMAIL PROTECTED]
Tel: 011 2655478
Cell: 082 895 1598
 

-Original Message-
From: Steve Fitzgerald [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 1:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session variables


I am designing a form using sessions in which the user inputs their
details on page 1 and after submitting they are directed to page 2 for
confirmation. They then have the option of editing their input (ie they
are returned to page 1) where their previous input is reflected in the
form fields by
value ='?php echo $var ?'
This works fine except if the input type is a drop down box, in which
case the default option is shown. Is there any way around this? How
can I show the user their previous choice in these boxes?
Any insights would be appreciated.
Steve


-- 
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] Session variables

2002-07-08 Thread Justin French

SELECT name=day
OPTION value=please select ? if(empty($day)) { echo selected; }
?
OPTION value=monday ? if($day == monday) { echo selected; } ?
OPTION value=tuesday ? if($day == tuesday) { echo selected; }
?
OPTION value=wednesday ? if($day == wednesday) { echo selected;
} ?
OPTION value=thursday ? if($day == thursday) { echo selected; }
?
OPTION value=friday ? if($day == friday) { echo selected; } ?
/SELECT

Obviously this is labourios to code... you can do this a lot smarter/quicker
with an array for the entire select box... have an array of days, and do a
foreach loop which writes the all the options for you, with the if
statements, etc etc.

By the way, this has nothing to do with sessions :)

It's purely about how to populate drop-down menus from an array, and how to
have the correct value selected if it exists, else showing a default
selection.

Cheers,

Justin French



on 08/07/02 9:36 PM, Steve Fitzgerald ([EMAIL PROTECTED]) wrote:

 I am designing a form using sessions in which the user inputs their
 details on page 1 and after submitting they are directed to page 2 for
 confirmation. They then have the option of editing their input (ie they
 are returned to page 1) where their previous input is reflected in the
 form fields by
 value ='?php echo $var ?'
 This works fine except if the input type is a drop down box, in which
 case the default option is shown. Is there any way around this? How
 can I show the user their previous choice in these boxes?
 Any insights would be appreciated.
 Steve
 


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




[PHP] mcrypt.dll

2002-07-08 Thread Wilbert Enserink

Hi all,


I'm using windows XP, apche and php 4.01

I need to test with the libraries mcrypt, so I guess I need mcrypt.dll.

Anybody has any idea how to do this, or to get more info about this?

thx Wilbert

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


[PHP] http upload corrupts my file on apache and Win XP

2002-07-08 Thread Mathias B

Hello

I use: Apache 2.0.36 and PHP 4.2.1 on WinXP

I have major problems when trying to upload files with the following code:

HTML code:

form name=theForm method=post action=../Doc_List/
ENCTYPE=multipart/form-data
input type=file name=data size=25
input type=submit name=Action value=? echo(__(Add)); ?
/form

Going to the PHP handler:

  if (is_uploaded_file($data))
  {
 $realname = $_FILES['data']['name'];

echo data: $data
run:.move_uploaded_file($_FILES['data']['tmp_name'],
c:\\windows\\temp\\php\\.$realname);
   }

The program prints: data: C:\WINDOWS\TEMP\php19C.tmp run:1
Everything goes fine if it is just a small text file. And everything seems
to also go fine for larger binary files (e.g. a word document), the document
gets copied to the temp directory. The problem is just that the file gets
completely scrambled on the way. The file almost doubles in size and the
binary data is not the same at all. seems like there is put some kind of
formatting in on the way. (Looks like it gets alot of \0 instead of NULL
bytes everywhere like some others on this group and on php.net has
experienced, but i just can't get it solved...)

I have these set in the php.ini file

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off

Please Help... :)

/Mathias Bertelsen




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




[PHP] Converting PCX to ...

2002-07-08 Thread BB

I'm writing a reporting system and I have a problem.

I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
PCXs.

So, to get round the problem, I need to convert the PCXs to JPGs or GIFs

Does anyone know of a piece of PHP that can do this inline, (by that I mean,
can be called and run in PHP script), because the images will have additions
and modifications on a regular basis; and they come as PCXs.

Anyone?
--BB




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




[PHP] problem with ftp_fut fixed?

2002-07-08 Thread jusob

Hello
Many people have the error 
Warning: error opening C:\\xxx\\xxx.xxx in /xxx/xxx/xxx.php when using the 
function ftp_put to upload a file.
Have this problem been fixed? If yes, could some one provide me a link to see 
how to do it. If no, I will explain my problem.

Thanks and sorry for my bad english
julien SObrier

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




Re: [PHP] regex for emoticon codes

2002-07-08 Thread Roger Thomas

yeeaHAH ! great. Thanks John.
think i'll never regret joining the list.

--
roger


--- John Legg [EMAIL PROTECTED] wrote:
 Hi Roger
 
 Try this:
 
 $str = sometext sometext [emoticon01] sometext [emoticon23] sometext;
 
 $new_str = preg_replace(/\[emoticon(\d\d)\]/, /image/emot/\\1.gif,
 $str);
 
 print $new_str;
 
 Seems to work?
 
 Rgds
 
 John
 
 - Original Message -
 From: Roger Thomas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 08, 2002 11:41 AM
 Subject: [PHP] regex for emoticon codes
 
 
  i have something like
  $str = sometext sometext [emoticon01] sometext [emoticon23] sometext;
 
  i would like to use regex to replace those codes into:
  sometext sometext /images/emot/01.gif sometext /images/emot/23.gif
 sometext
 
  all numerics after the code emoticon consisted of exactly 2 digits; and
 they
  are in the range from emoticon01 to emoticon30.
 
  i have spent the whole day starring at my crt and reading manpages plus
  examples. i achieved nothing but sore eyes.
 
  i would GREATLY-GREATLY appreciate if someone could gimme a code snippet
 on how
  to this sorta thing.
 
  best rgds.
  roger
 
 
 
  __
  Do You Yahoo!?
  Sign up for SBC Yahoo! Dial - First Month Free
  http://sbc.yahoo.com
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




Re: [PHP] Session variables

2002-07-08 Thread Steve Fitzgerald

Thanks Justin, your solution is spot-on!
Regards
Steve

Justin French wrote:

 SELECT name=day
 OPTION value=please select ? if(empty($day)) { echo selected; }
 ?
 OPTION value=monday ? if($day == monday) { echo selected; } ?
 OPTION value=tuesday ? if($day == tuesday) { echo selected; }
 ?
 OPTION value=wednesday ? if($day == wednesday) { echo selected;
 } ?
 OPTION value=thursday ? if($day == thursday) { echo selected; }
 ?
 OPTION value=friday ? if($day == friday) { echo selected; } ?
 /SELECT

 Obviously this is labourios to code... you can do this a lot smarter/quicker
 with an array for the entire select box... have an array of days, and do a
 foreach loop which writes the all the options for you, with the if
 statements, etc etc.

 By the way, this has nothing to do with sessions :)

 It's purely about how to populate drop-down menus from an array, and how to
 have the correct value selected if it exists, else showing a default
 selection.

 Cheers,

 Justin French

 on 08/07/02 9:36 PM, Steve Fitzgerald ([EMAIL PROTECTED]) wrote:

  I am designing a form using sessions in which the user inputs their
  details on page 1 and after submitting they are directed to page 2 for
  confirmation. They then have the option of editing their input (ie they
  are returned to page 1) where their previous input is reflected in the
  form fields by
  value ='?php echo $var ?'
  This works fine except if the input type is a drop down box, in which
  case the default option is shown. Is there any way around this? How
  can I show the user their previous choice in these boxes?
  Any insights would be appreciated.
  Steve
 


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




Re: [PHP] getting the IP address off a visitor

2002-07-08 Thread Chris Hewitt

Sebastian,

Yes, look at the data returned by running phpinfo() and you will see it. 
As discussed very recently on this list, an IP address is not a good way 
to determine whether this is a new user or not. I suggest you look in 
the recent archives for the discussion on this topic.

HTH
Chris

Sebastian Marcu wrote:

Hi there,

I am new to PHP and need some help.
I was wondering if there is a way to get hold of the IP address of a site
visitor with PHP. I'm trying to develop an interaction where the server
would recognise a new visitor from a returning visitor via the IP address.

Regards,


Sebastian








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




Re[2]: [PHP] Session variables

2002-07-08 Thread Michal Dvoracek

 SELECT name=day
 OPTION value=please select ? if(empty($day)) { echo selected; }
 ?
 OPTION value=monday ? if($day == monday) { echo selected; } ?
 OPTION value=tuesday ? if($day == tuesday) { echo selected; }
 ?
 OPTION value=wednesday ? if($day == wednesday) { echo selected;
 } ?
 OPTION value=thursday ? if($day == thursday) { echo selected; }
 ?
 OPTION value=friday ? if($day == friday) { echo selected; } ?
 /SELECT

better is (IMHO):
OPTION value=please select?php echo empty($day) ? ' selected' : ''; ?
OPTION value=monday?php echo $day == 'monday' ? ' selected' : '';?

Regards,
Michal Dvoracek  [EMAIL PROTECTED]


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




Re: Re[2]: [PHP] Session variables

2002-07-08 Thread BB

and to bring it up another level:
OPTION value=please select?=((empty($day)) ? ' selected' : ''); ?
OPTION value=monday?=(($day == 'monday') ? ' selected' : '');?

:oP

Michal Dvoracek [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  SELECT name=day
  OPTION value=please select ? if(empty($day)) { echo
selected; }
  ?
  OPTION value=monday ? if($day == monday) { echo selected; }
?
  OPTION value=tuesday ? if($day == tuesday) { echo
selected; }
  ?
  OPTION value=wednesday ? if($day == wednesday) { echo
selected;
  } ?
  OPTION value=thursday ? if($day == thursday) { echo
selected; }
  ?
  OPTION value=friday ? if($day == friday) { echo selected; }
?
  /SELECT

 better is (IMHO):
 OPTION value=please select?php echo empty($day) ? ' selected' : '';
?
 OPTION value=monday?php echo $day == 'monday' ? ' selected' : '';?

 Regards,
 Michal Dvoracek  [EMAIL PROTECTED]




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




Re: [PHP] HTTPS vs. HTTP ?

2002-07-08 Thread Martin Clifford

How do you know their certificate hasn't been stolen, and they haven't even
figured it out yet?  How do you know they were trustworthy people in the
first place?

Why do you ASSUME that they're NOT trustworthy people?  Do you go through your entire 
life in that shell?

The more I think about this, the more I agree with people who just won't do
eCommerce at all...

Just the opposite for me.  Time to go web-shoppin!

Martin

-- 
Like Music?  http://l-i-e.com/artists.htm 


-- 
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] keep textformating ?

2002-07-08 Thread Hawk

Lets say I have a guestbook, and I want the text the visitors write in it be
saved in a database(mysql) and when retrieved, if should have the same
textformating, I guess this is a really basic thing, but I don't know what
to look for :)
I've caught \n and ereg*, but I'm not sure that's the thing, help bitte .)

Håkan



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




Re: [PHP] keep textformating ?

2002-07-08 Thread Justin French

The only text formatting you're likely to have in a text field from a html
form is line breaks (\n).

So, to keep the formatting of these breaks, insert the text into the DB as
is, then on pulling it out, convert \n's to br /'s using nl2br($string),
so that the newlines appear within a HTML page.

Justin French


on 08/07/02 11:28 PM, Hawk ([EMAIL PROTECTED]) wrote:

 Lets say I have a guestbook, and I want the text the visitors write in it be
 saved in a database(mysql) and when retrieved, if should have the same
 textformating, I guess this is a really basic thing, but I don't know what
 to look for :)
 I've caught \n and ereg*, but I'm not sure that's the thing, help bitte .)
 
 Håkan
 
 


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




[PHP] Passing variables

2002-07-08 Thread Anthony Rodriguez

Dear Justin,

After reading Kevin Yank's Managing Users ... at www.sitepoint.com, I 
tried the following 2 scripts. Unfortunately, the variable $course is NOT 
being passed to the 2nd script. Thus, per the script, the Home page is 
displayed. Why?

--- 1st script ---

?php
// file: root/reg_users_2.php, updated: 07/08/02
set_time_limit(300);
session_start();
session_register(course);
$course=stats_101;
header (location:estadisticas/contents.php);
flush();
exit;
?

--- 2nd script ---

?php
// file: root/estadisticas/contents.php, updated: 07/06/02
set_time_limit(300);
if ($course!=stats_101)
{
header(location:../index.htm); // Home page
flush();
exit;
}
else
{
echo 
html

--- HTML code here ---

/html

;
};
flush();
exit;
?

Thanks!

Tony



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




RE: [PHP] HTTPS vs. HTTP ? - the weakest link

2002-07-08 Thread Brinkman, Theodore

Think about it for a moment.  E-commerce involving properly signed sites is,
at the very least, more secure than handing your credit card to a waiter in
a restauraunt.  The waiter can walk off with your card, and come back 2
minutes later with your card.  You'll never know if he copied down the name,
cc number and expiration date for later use.

- Theo

-Original Message-
From: B.C. Lance [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 07, 2002 12:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTPS vs. HTTP ? - the weakest link


sorry to barge in. but the weakest link ain't in ssl. doesn't really 
matter how secure vs insecure it is. you can come up with the most 
secure technology in the whole world that no one can break into. the 
weakest link lies on the user/customer themselves.

you just need a trojan horse in their computer and there goes the 
neighbourhood. they can by all means send their credit card information 
over to amazon.com. but this piece of information will still be open to 
the person who plant the horse in the machine.

so i suppose the debate over here should really be: is ecommerce safe?
and not: http vs https


just my 2 cents
b.c. lance


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




Re: [PHP] keep textformating ?

2002-07-08 Thread Nookie

Hello Hawk,

Monday, July 8, 2002, 3:28:02 PM, you wrote:

H Lets say I have a guestbook, and I want the text the visitors write in it be
H saved in a database(mysql) and when retrieved, if should have the same
H textformating, I guess this is a really basic thing, but I don't know what
H to look for :)
H I've caught \n and ereg*, but I'm not sure that's the thing, help bitte .)

nl2br($string);

-- 
Greetings,
 Nookie  mailto:[EMAIL PROTECTED]
 http://www.shakira-online.net
 http://www.xtina.pl
 http://www.jessica.prv.pl



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




RE: [PHP] session problem

2002-07-08 Thread Naintara Jain

Just thought I'd mail it here.
It's a reported bug, Bug #16263.
Discovered (after hours of agonizing).

martin, values were being assigned and passed :) thanks anyway.


-Original Message-
From: Martin Clifford [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 6:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session problem


You have to set the variables before using session_register().

?php
session_start();
$var = Yo;
session_register(var);
?

If you try registering a variable that has no value, then of course no value
can be carried over to the next page. :o)

Martin

 Naintara Jain [EMAIL PROTECTED] 07/06/02 09:08PM 
I am storing some values in session variables.
The behavior of the session is pretty unpredictable.

On the first page I begin with:
session_name(aname)
session_start()
session_register(var1,var2)

In another page I check for existing value of session variable var2.
In the next page I have the following code:
session_name(aname)
session_start()

if(($var2)== || !isset($var2))
invalid

But the strange thing is that the session value is not accessible in the
other page.

I have tried passing the session id though session_id() in the URL.

Session handling has been giving me some trouble (windows 2000, IIS)
The strange thing is that it works some times.

Can anyone give any pointers?



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






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




[PHP] Re: getting the IP address off a visitor

2002-07-08 Thread Mark McCulligh

Here is a function a found on php.net that turns the IP.

Everything that Justin said is true too.  If they have a dial-up user or are
behind a proxy server you can't track them.

Also if you are saving this to a database table it will get very big fast,
just like Justin said.  I would create a table just for today's hits, then
have a script run at 12:01 everyday that creates a summary record and saves
it to another table.  Then delete the records from the today hits.  You
could setup a crontab to run the script for you.

function getip() {
 if (isSet($_SERVER)) {
  if (isSet($_SERVER[HTTP_X_FORWARDED_FOR])) {
   $realip = $_SERVER[HTTP_X_FORWARDED_FOR];
  } elseif (isSet($_SERVER[HTTP_CLIENT_IP])) {
   $realip = $_SERVER[HTTP_CLIENT_IP];
  } else {
   $realip = $_SERVER[REMOTE_ADDR];
  }

 } else {
  if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
   $realip = getenv( 'HTTP_X_FORWARDED_FOR' );
  } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) {
   $realip = getenv( 'HTTP_CLIENT_IP' );
  } else {
   $realip = getenv( 'REMOTE_ADDR' );
  }
}
 return $realip;
}
_
Mark McCulligh, Application Developer / Analyst
Sykes Canada Corporation www.SykesCanada.com
(888)225-6824 ex. 3262
[EMAIL PROTECTED]
- Original Message -
From: Sebastian Marcu [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Thursday, July 04, 2002 12:00 PM
Subject: getting the IP address off a visitor


 Hi there,

 I am new to PHP and need some help.
 I was wondering if there is a way to get hold of the IP address of a site
 visitor with PHP. I'm trying to develop an interaction where the server
 would recognise a new visitor from a returning visitor via the IP address.

 Regards,


 Sebastian






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




Re: [PHP] phpBB Info

2002-07-08 Thread Martin Clifford

I'm sure there is a phpBB specific userbase out there that could answer this question 
for you.  My guess would be... I don't know, something like http://www.phpbb.com. 

Martin

 BrettM [EMAIL PROTECTED] 07/06/02 12:35PM 
I wanna be able to do some stuff, which involves getting data from my phpBB
board.

Member Count: (this section should autoupdate)
Number Of Forums: (this section should autoupdate)
Highest Post Count: (this section shouldauto  update((member) with (post
count) posts))
Most Replied to topic: (this section should auto update((topic) with (number
of replys) replys))

Can someone give me the code to do this

the page with this on is in my base directory. My forums are in /forums



-- 
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] Announce: phpxmlclasses v 1.10

2002-07-08 Thread Garland Foster

Hi all,

http://phpxmlclasses.sourceforge.net/

I wanted to announce a new version of the phpxmlclasses package.
In this version I added an implementation of the RDQL language
to query RDF documents from local files or URLs.
Up to now the repository has the following classes:

XSLT: a wrapper for the xslt processor.
Xindice: implements the XML-RPC API for Xindice
RDQL: A RDQL engine for RDF documents (files/URLs)
RSS parser: A parser to process RSS 1.0 documents
RDF parser: A generic RDF parser (port of Repat)
RDDL parser: A parser to extract resource elements from RDDL documents.
Schematron: An implementation of the Schematron language
Xquery Lite: An implementation of Xquery Lite, a subset of Xquery 1.0
SAX filters: SAX filters for streamlined SAX processing
Path parser: A generic XML event-driven parser based on paths.

Garland


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




[PHP] Re: Stack Overflow with: zend optimizer

2002-07-08 Thread colin mcdonald

Richard Lynch wrote:
 
 You *MIGHT* try installing the Optimizer on a Dev box and turning on *ONE*
 opitmization group/feature at a time and then pounding on that Dev server
 with 'ab' until you narrow down which optimizations are the trouble-makers.

Tried that.  Each optimization value/setting fails in the same way.

 
 Why in the *WORLD* do you have hundreds of includes, though?
 

Easier to organize, maintain and it's the only a group of developers can 
  work efficiently on a project at the same time.

 
 You do realize that including a hundred include files is incredibly slow,
 right?...  You may be able to drastically improve performance if there's any
 way to combine those files...
 

We tested this a long time ago and there was little time difference 
between one file and many files.  I think this has to do with the fact 
that the page already take roughly a 2 seconds to load, so a couple tens 
of milliseconds didn't make a difference.

Thanks for the advice,

colin


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




[PHP] Re: Stack Overflow with: zend optimizer

2002-07-08 Thread colin mcdonald

Oh yeah, this is what I did to stabilize the server:

-take out zend_optimizer from php.ini
-put process isolation level to HIGH (as Michael suggested)
-put IIS in the ISAPI filter list
-disable chaching of isapi applications

colin

Colin McDonald wrote:
 Richard Lynch wrote:
 

 You *MIGHT* try installing the Optimizer on a Dev box and turning on 
 *ONE*
 opitmization group/feature at a time and then pounding on that Dev server
 with 'ab' until you narrow down which optimizations are the 
 trouble-makers.
 
 
 Tried that.  Each optimization value/setting fails in the same way.
 

 Why in the *WORLD* do you have hundreds of includes, though?
 
  
 
 Easier to organize, maintain and it's the only a group of developers can 
  work efficiently on a project at the same time.
 

 You do realize that including a hundred include files is incredibly slow,
 right?...  You may be able to drastically improve performance if 
 there's any
 way to combine those files...

 
 We tested this a long time ago and there was little time difference 
 between one file and many files.  I think this has to do with the fact 
 that the page already take roughly a 2 seconds to load, so a couple tens 
 of milliseconds didn't make a difference.
 
 Thanks for the advice,
 
 colin
 



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




[PHP] $_REQUEST???

2002-07-08 Thread Scott Fletcher

Can the $_REQUEST be trusted??  The documentation said it is the combination
of $_GET, $_POST, $_COOKIE  $_FILE.  If the PHPSESSID is found in
$_REQUEST, I can tell it is from $_COOKIE.  I wonder if the PHPSESSID can be
stored into $_REQUEST if hte $_COOKIE is unavailable or turned off?

FletchSOD



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




[PHP] Time to Calculate Time

2002-07-08 Thread vins

Hey there ppl..

One dam thing i've been trying to figure out for about 2 weeks now it how
the hell to calculate time.

i have variables $Start, $End each with a timestamp 2 hours apart
(2002070714, 2002070716) respectively

How do i calculate those to timestamps to get the answer 2?

I've tried working them into unix timestamps and then calculating but no
luck...

any one got any ideas ??

Thanx
Vins



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




[PHP] Parsing CGI for PHP?

2002-07-08 Thread Sandman

Can this be done with apache 1.3 ?
I want to have the output of my CGI-script to be parsed with PHP, or 
rather, have the php within the ? .. ? parsed, of course, since the 
script outputs alot more than just php-code.

Is it possible?

-- 
Sandman[.net]

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




[PHP] Session problems with popup window

2002-07-08 Thread Michael Champagne

I can't seem to find an elegant solution to this and was hoping you guys could
offer some insight.

We are using sessions on our webpage and one of the links on our main page,
launches a separate popup window which has some PHP on it and contains some
java applets which launch our web-based trading application.  The thing is
that part of this page requires that we have the user ID for a database lookup
which is part of the user's session data.  Basically, it lets the user refresh
a directory to see if a file is there and available for download.  If the user
logs out in the main window, we lose this session data and the user ID and the
page chokes because it cannot find the user directory because we've lost the
user ID.

Does anyone have any ideas how we can get around this?  Thanks in advance for
any replies -- this mailing list has been a huge help for us.

-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



**
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
**

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




Re: [PHP] Passing variables

2002-07-08 Thread Jim lucas

Because the session is not being started on the second page.  to be able to
get the contents of a variable that is in a session environment, you must
first initiate sessions with the call session_start();  even if that is all
you do before referancing the varialble.

so, add session_start(); just after entering the second script and is should
work.  if it doesn't, if you have php 4.1.0 or newer use $_SESSION['course']
if older version you are working with, use $HTTP_SESSION_VARS['course'] .
Hope this helps.

Jim Lucas
- Original Message -
From: Anthony Rodriguez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 5:40 AM
Subject: [PHP] Passing variables


 Dear Justin,

 After reading Kevin Yank's Managing Users ... at www.sitepoint.com, I
 tried the following 2 scripts. Unfortunately, the variable $course is NOT
 being passed to the 2nd script. Thus, per the script, the Home page is
 displayed. Why?

 --- 1st script ---

 ?php
 // file: root/reg_users_2.php, updated: 07/08/02
 set_time_limit(300);
 session_start();
 session_register(course);
 $course=stats_101;
 header (location:estadisticas/contents.php);
 flush();
 exit;
 ?

 --- 2nd script ---

 ?php
 // file: root/estadisticas/contents.php, updated: 07/06/02
 set_time_limit(300);
 if ($course!=stats_101)
 {
 header(location:../index.htm); // Home page
 flush();
 exit;
 }
 else
 {
 echo 
 html

 --- HTML code here ---

 /html

 ;
 };
 flush();
 exit;
 ?

 Thanks!

 Tony



 --
 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] Session problems with popup window

2002-07-08 Thread Jim lucas

pass the user id to the page as a url variable.  maybe set a unique cookie
name for that value that won't get destroyed when the person logs out.

Jim Lucas
- Original Message -
From: Michael Champagne [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 8:18 AM
Subject: [PHP] Session problems with popup window


 I can't seem to find an elegant solution to this and was hoping you guys
could
 offer some insight.

 We are using sessions on our webpage and one of the links on our main
page,
 launches a separate popup window which has some PHP on it and contains
some
 java applets which launch our web-based trading application.  The thing is
 that part of this page requires that we have the user ID for a database
lookup
 which is part of the user's session data.  Basically, it lets the user
refresh
 a directory to see if a file is there and available for download.  If the
user
 logs out in the main window, we lose this session data and the user ID and
the
 page chokes because it cannot find the user directory because we've lost
the
 user ID.

 Does anyone have any ideas how we can get around this?  Thanks in advance
for
 any replies -- this mailing list has been a huge help for us.

 --
 Michael Champagne, Software Engineer
 Capital Institutional Services, Inc.
 wk: [EMAIL PROTECTED]
 hm: [EMAIL PROTECTED]



 **
 This communication is for informational purposes only.  It is not
 intended as an offer or solicitation for the purchase or sale of
 any financial instrument or as an official confirmation of any
 transaction, unless specifically agreed otherwise.  All market
 prices, data and other information are not warranted as to
 completeness or accuracy and are subject to change without
 notice.  Any comments or statements made herein do not
 necessarily reflect the views or opinions of Capital Institutional
 Services, Inc.  Capital Institutional Services, Inc. accepts no
 liability for any errors or omissions arising as a result of
 transmission.  Use of this communication by other than intended
 recipients is prohibited.
 **

 --
 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] keep textformating ?

2002-07-08 Thread Analysis Solutions

On Mon, Jul 08, 2002 at 11:38:17PM +1000, Justin French wrote:
 
 So, to keep the formatting of these breaks, insert the text into the DB as
 is, then on pulling it out, convert \n's to br /'s using nl2br($string),
 so that the newlines appear within a HTML page.

Or put the code between pre /pre tags.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Time to Calculate Time

2002-07-08 Thread Danny Shepherd

Try this:

?php

function unixTime($time)
{
 $year=substr($time,0,4);
 $month=substr($time,4,2);
 $day=substr($time,6,2);
 $hour=substr($time,8,2);
 $min=substr($time,10,2);
 $sec=substr($time,12,2);

 return strtotime($year/$month/$day $hour:$min:$sec);
}

$time1='2002070714';
$time2='2002070716';

$timeDiff=unixTime($time2)-unixTime($time1);

echo The two times are $timeDiff seconds apart;
?

There's bound to be a way to do this much more neatly using a regexp but
this was quick to write and it works :)

HTH

Danny.


- Original Message -
From: vins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 4:02 PM
Subject: [PHP] Time to Calculate Time


 Hey there ppl..

 One dam thing i've been trying to figure out for about 2 weeks now it how
 the hell to calculate time.

 i have variables $Start, $End each with a timestamp 2 hours apart
 (2002070714, 2002070716) respectively

 How do i calculate those to timestamps to get the answer 2?

 I've tried working them into unix timestamps and then calculating but no
 luck...

 any one got any ideas ??

 Thanx
 Vins



 --
 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] snmpwalk

2002-07-08 Thread MAAS

Hi

Iam trying to use snmpwalk but I get this:

Parse error: parse error, unexpected T_VARIABLE in
c:\inetpub\wwwroot\alarm.php on line 7

This Is my code:

HTML
HEAD
TITLEALARM ???/TITLE
? php
$a = snmpwalk(192.168.10.8, pub_likt, 1.3.6.1.2.1.1);
?
/HEAD
/HTML




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




Re: [PHP] snmpwalk

2002-07-08 Thread B i g D o g

try 

?php


with no space...


B i g D o g



- Original Message - 
From: MAAS [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 08, 2002 2:24 AM
Subject: [PHP] snmpwalk


 Hi
 
 Iam trying to use snmpwalk but I get this:
 
 Parse error: parse error, unexpected T_VARIABLE in
 c:\inetpub\wwwroot\alarm.php on line 7
 
 This Is my code:
 
 HTML
 HEAD
 TITLEALARM ???/TITLE
 ? php
 $a = snmpwalk(192.168.10.8, pub_likt, 1.3.6.1.2.1.1);
 ?
 /HEAD
 /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




[PHP] Re: snmpwalk

2002-07-08 Thread colin mcdonald

it's the space between ? and php

colin


Maas wrote:
 Hi
 
 Iam trying to use snmpwalk but I get this:
 
 Parse error: parse error, unexpected T_VARIABLE in
 c:\inetpub\wwwroot\alarm.php on line 7
 
 This Is my code:
 
 HTML
 HEAD
 TITLEALARM ???/TITLE
 ? php
 $a = snmpwalk(192.168.10.8, pub_likt, 1.3.6.1.2.1.1);
 ?
 /HEAD
 /HTML
 
 
 



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




Re: [PHP] Time to Calculate Time

2002-07-08 Thread Danny Shepherd

You just knew there was a regexp version on the way, didn't you :)

Danny.

?php

function unixTime($time)
{
 $time=preg_replace('/(.{4})(.{2})(.{2})(.{2})(.{2})(.{2})/','\\1/\\2/\\3
\\4:\\5:\\6',$time);
 return strtotime($time);
}

$time1='2002070714';
$time2='2002070716';

$timeDiff=unixTime($time2)-unixTime($time1);

echo The two times are $timeDiff seconds apart;
?




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




Re: [PHP] is their a jobs mailing list?

2002-07-08 Thread Bret L Conard

Hi all,
I posted a message about a FREE technical job site I just finished as a
direct result of looking for that kind of site and not finding it.
I had asked for feedback and got 1 response about a mis-spelled word (which
I fixed). The site may charge eventually but for now It is free to post
profiles, and Job opportunities.

I  would very much like it to showcase PHP and MySQL as that is what I do,
and The entire site is done in them. I will still welcome any input, but the
site is there and free for use


Thanks
Bret
- Original Message -
From: Peter J. Schoenster [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 07, 2002 11:39 PM
Subject: [PHP] is their a jobs mailing list?


 Hi,

 I was here first:

 http://www.php.net/manual/en/faq.mailinglist.php#faq.mailinglist.guideline

  Before you post to the list please have a look in this FAQ

 But I found nothing about a jobs mailing list. I'm really a Perl
programmer and
 we have jobs.perl.org which has a list which does a really good job.

 A person from Houston, TX asked me if I knew of any PHP people in Houston.
 I advertise on Google and Overture as a developer for hire.

 I don't sugget he post to this list as I'm not sure of the etiquette and
I've never
 seen jobs posted to this list; I know they are accepted heartily on the
 mod_perl list.

 Anything simple but effective like this site for PHP?

 http://jobs.perl.org/

 Peter




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




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




Re: [PHP] is their a jobs mailing list?

2002-07-08 Thread Bret L Conard

The site is called:

tech-temp.com


Bret



Re: [PHP] Parsing CGI for PHP?

2002-07-08 Thread Chris Hewitt

A fairly full discussion on this has only just finished on this list in 
the last couple of days. May I respectfully suggest the archives will 
have the information you seek.

HTH
Chris

Sandman wrote:

Can this be done with apache 1.3 ?
I want to have the output of my CGI-script to be parsed with PHP, or 
rather, have the php within the ? .. ? parsed, of course, since the 
script outputs alot more than just php-code.

Is it possible?




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




[PHP] Cross-Site Sesison ID Propagation

2002-07-08 Thread Stefen Lars

Hello all fellow-hackers

I am working on a project that includes a number of web sites, which are 
grouped together into one network. Kind of like the ‘OSDN’ network, of which 
Slashdot.org, for example, is a member.

I need to implement a cross-site session. Using a technique, similar to the 
one described at PHPBuilder 
(http://www.phpbuilder.com/columns/chriskings20001128.php3) I implemented 
this without too much difficulty.

The links at the top of each site (links to other sites in the network) 
simply include the session id in the GET request:

a href=http://www.site.com/?sid=1234567;Site1/a | a 
href=http://www.site2.com/?sid=1234567;Site2/a | a 
href=http://www.site3.com/?sid=1234567;Site3/a etc

As per article, the session id is passed between the sites with ease and the 
session from Site 1 can be continued on Site 3 for example.

However, there are a number of cross-site links in the main body of the site 
(i.e. not in the network link bar at the top of the page) that link various 
articles from one site to another.

Thus, when a user clicks on one of these cross-site links, s/he cannot 
continue her/his session, as the session ID is not propagated; the 
‘--enable-trans-sid’ option only works on internal links (a very wise design 
choice, may I add).

However, in my case, I would like to be able to define a list of external 
sites that the ‘--enable-trans-sid’ option works with. (i.e. the sites in 
the network).

Is this possible?

If not, which method could I use to propagate the session id between the 
sites in the network?

I know, it would be possible to manually add the session id to each 
cross-site link, but this is not a great idea, as a number of the links are 
from web site visitors in user-comments / forum posts they have submitted.

I may be possible to use output buffering to rewrite the cross-site links to 
include the session id (like the ‘--enable-trans-sid’ option works, I 
guess). But, as I am using compression 
(ob_start(zlib.output_compression);), that may not work. Plus, it seems a 
very fiddly method to me.

Any suggestions from anyone, on how I may perform the cross-site session 
propagation?

All the best

/S




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] Time to Calculate Time

2002-07-08 Thread vins

That looks great.
But why do you have to carage the line after 3 in the function ?


Danny Shepherd [EMAIL PROTECTED] wrote in message
022001c22696$087e4cc0$0200a8c0@DANNYS">news:022001c22696$087e4cc0$0200a8c0@DANNYS...
 You just knew there was a regexp version on the way, didn't you :)

 Danny.

 ?php

 function unixTime($time)
 {
  $time=preg_replace('/(.{4})(.{2})(.{2})(.{2})(.{2})(.{2})/','\\1/\\2/\\3
 \\4:\\5:\\6',$time);
  return strtotime($time);
 }

 $time1='2002070714';
 $time2='2002070716';

 $timeDiff=unixTime($time2)-unixTime($time1);

 echo The two times are $timeDiff seconds apart;
 ?






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




Re: [PHP] Time to Calculate Time

2002-07-08 Thread vins

Never mind that just needs a space
Thanx for all the help...

have a surf to http://forum.ywait.co.za/  register and then i'll make you a
MOD for the php scripting forum board.
for the future.

if you want

Cheerz


Danny Shepherd [EMAIL PROTECTED] wrote in message
022001c22696$087e4cc0$0200a8c0@DANNYS">news:022001c22696$087e4cc0$0200a8c0@DANNYS...
 You just knew there was a regexp version on the way, didn't you :)

 Danny.

 ?php

 function unixTime($time)
 {
  $time=preg_replace('/(.{4})(.{2})(.{2})(.{2})(.{2})(.{2})/','\\1/\\2/\\3
 \\4:\\5:\\6',$time);
  return strtotime($time);
 }

 $time1='2002070714';
 $time2='2002070716';

 $timeDiff=unixTime($time2)-unixTime($time1);

 echo The two times are $timeDiff seconds apart;
 ?






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




RE: [PHP] HTTPS vs. HTTP ? - the weakest link

2002-07-08 Thread Miguel Cruz

On Mon, 8 Jul 2002, Brinkman, Theodore wrote:
 Think about it for a moment.  E-commerce involving properly signed sites is,
 at the very least, more secure than handing your credit card to a waiter in
 a restauraunt.  The waiter can walk off with your card, and come back 2
 minutes later with your card.  You'll never know if he copied down the name,
 cc number and expiration date for later use.

And in real life, that's how most credit card numbers are stolen.

miguel


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




Re: [PHP] Converting PCX to ...

2002-07-08 Thread Miguel Cruz

On Mon, 8 Jul 2002, BB wrote:
 I'm writing a reporting system and I have a problem.
 
 I need to insert PCXs into a PDF (using PDFLib), but it doesn't support
 PCXs.
 
 So, to get round the problem, I need to convert the PCXs to JPGs or GIFs
 
 Does anyone know of a piece of PHP that can do this inline, (by that I mean,
 can be called and run in PHP script), because the images will have additions
 and modifications on a regular basis; and they come as PCXs.

You can do it with Imagemagick. As I recall, there used to be direct PHP 
functions for Imagemagick but they have disappeared many versions ago, so 
you'll have to run it via system() et al.

miguel


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




[PHP] Linux Newsgroup???

2002-07-08 Thread Scott Fletcher

Hey!

Is there a Linux newsgroup?  A place where people can send emails or posting
about Linux, like tech support, programming, installation, feedback,
advices, work around, etc.  Just like hte same concept as the PHP newsgroup
here.

Thanks,
 FletchSOD



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




Re: [PHP] Parsing CGI for PHP?

2002-07-08 Thread Sandman

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Chris Hewitt) wrote:

 Can this be done with apache 1.3 ?
 I want to have the output of my CGI-script to be parsed with PHP, or 
 rather, have the php within the ? .. ? parsed, of course, since the 
 script outputs alot more than just php-code.
 
 Is it possible?

 A fairly full discussion on this has only just finished on this list in 
 the last couple of days. May I respectfully suggest the archives will 
 have the information you seek.

I apologize deeply, but I am using the NNTP interface to these lists, and I 
can't find the thread you're talking about (and the listing spans over a 
week). I would be very glad if you would support me by naming the thread 
subject that recently discussed this matter. 

Thanks in advance!

-- 
Sandman[.net]

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




Re: [PHP] Linux Newsgroup???

2002-07-08 Thread Miguel Cruz

On Mon, 8 Jul 2002, Scott Fletcher wrote:
 Is there a Linux newsgroup?  A place where people can send emails or posting
 about Linux, like tech support, programming, installation, feedback,
 advices, work around, etc.  Just like hte same concept as the PHP newsgroup
 here.

comp.os.linux.admin
comp.os.linux.misc
comp.os.linux.advocacy
comp.os.linux.network
comp.os.linux.alpha
comp.os.linux.networking
comp.os.linux.announce
comp.os.linux.portable
comp.os.linux.answers
comp.os.linux.powerpc
comp.os.linux.development.apps
comp.os.linux.development.system
comp.os.linux.questions
comp.os.linux.embedded
comp.os.linux.redhat
comp.os.linux.hardware
comp.os.linux.security
comp.os.linux.help
comp.os.linux.setup
comp.os.linux.m68k
comp.os.linux.x

miguel


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




[PHP] Editing Word Documents

2002-07-08 Thread David Russell

Hi all

I have just had a request about editing Word Documents...

I have an intranet, which provides access to, amongst others, Word 
Documents about policies, etc. What the guys are looking for is a way to 
do the following:

1. Show a list of files available for editing
2. If a file is clicked, then it is locked for other users (no access)
3. The file opens on the client's machine
4. The client edits it
5. The client then closes the file, it auto-saves and he goes about 
his business.

Points 1 through 3 are relatively trivial. Point 4 and 5 (especially 5) 
have me lost.

How do you get a file to be edited, and then automatically returned to 
the server by M$ Word in it's changed format. Is this possible?

How would this change in a database-backended system (including the 
files as BLOBs)?

Thanks

David R


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




Re: [PHP] Linux Newsgroup???

2002-07-08 Thread Scott Fletcher

Wow!  That's a lot!!!  I guess, it can't be made into 1 newsgroup!  :-)

Thanks,
 FletchSOD
Miguel Cruz [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Mon, 8 Jul 2002, Scott Fletcher wrote:
  Is there a Linux newsgroup?  A place where people can send emails or
posting
  about Linux, like tech support, programming, installation, feedback,
  advices, work around, etc.  Just like hte same concept as the PHP
newsgroup
  here.

 comp.os.linux.admin
 comp.os.linux.misc
 comp.os.linux.advocacy
 comp.os.linux.network
 comp.os.linux.alpha
 comp.os.linux.networking
 comp.os.linux.announce
 comp.os.linux.portable
 comp.os.linux.answers
 comp.os.linux.powerpc
 comp.os.linux.development.apps
 comp.os.linux.development.system
 comp.os.linux.questions
 comp.os.linux.embedded
 comp.os.linux.redhat
 comp.os.linux.hardware
 comp.os.linux.security
 comp.os.linux.help
 comp.os.linux.setup
 comp.os.linux.m68k
 comp.os.linux.x

 miguel




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




[PHP] MIB and snmp

2002-07-08 Thread MAAS

Iam trying to get some data on a php homepage. I get the data vith snmp msg.
I get som msg, but when I try to get a speciall object ID i get this:

ALARM 27 (port 52):
Warning: Error in packet. Reason: (noSuchName) There is no such variable
name in this MIB. in c:\inetpub\wwwroot\alarm.php on line 6

Warning: This name does not exist: enterprises.2606.1.0.47 in
c:\inetpub\wwwroot\alarm.php on line 6


ALARM 26 (port 50):
Warning: Error in packet. Reason: (noSuchName) There is no such variable
name in this MIB. in c:\inetpub\wwwroot\alarm.php on line 8

Warning: This name does not exist: enterprises.2606.1.0.46 in
c:\inetpub\wwwroot\alarm.php on line 8

Anyone what to do??






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




[PHP] Re: PHP: Script Security: Best coding practices

2002-07-08 Thread Tim Luoma

olinux wrote:

A little off your request, but may be of interest:

Top 21 PHP Programming Mistakes from Zend.com
http://www.zend.com/zend/art/mistake1.php
http://www.zend.com/zend/art/mistake2.php


Hrm... I wonder if someone  Zend has messed up their template for 
title/titles

The titles are coming up as Zend /  which isn't very helpful when 
bookmarking

TjL




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




Re: [PHP] Parsing CGI for PHP?

2002-07-08 Thread Analysis Solutions

On Mon, Jul 08, 2002 at 06:11:16PM +0200, Sandman wrote:
 
 I apologize deeply, but I am using the NNTP interface to these lists, and I 
 can't find the thread you're talking about.

http://groups.google.com/groups?hl=ensafe=offgroup=php.general

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] php is not working with submit button

2002-07-08 Thread Terry Cheung

Hi,

I have just downloaded the latest source of apache, php, mod_ssl and
mysql to build them all together. It can show the php page and can connect
to the mysql database, the only problem is all the php pages seem likes do
not response to the submit button, it just direct back to the same page and
cannot get the data pass to the php script. I have tried the get  and
post method. It works with my older version of apache with php and also I
can submit data in the cgi-bin using the new apache. May anyone please help
me? Thanks in advance.

Terry




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




[PHP] Variable not passing to second page

2002-07-08 Thread Terry Cheung

I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
php script files. They can display successfully,  but whei I submit the
data, they cannot pass to the second page even they can be shown in the URL
with get method. here is one of my script


jobapp.php
HTML
!-- jobapp.php--
 BODY

 ?php
  require(common.php)
 ?
 H1?php echo (COMPANY); ? jobs application form/H1
 PAre you finding a challenging career in the bicycle world?
Still waiting for what?/P
 FORM NAME='frmJobApp' METHOD= get ACTION=jobapp_action.php
 Please Enter Your Name Here(Required):
 INPUT NAME=applicant TYPE=textBR
 Please enter your phone number:
 INPUT NAME=phone TYPE=textBR
 Please enter your E-mail address(Required):
 INPUT NAME=email TYPE=textBR

 Please choos the Department:
 SELECT NAME=position
  OPTION VALUE=aAccount/OPTION
  OPTION VALUE=bRepairing/OPTION
  OPTION VALUE=hHuman Resources/OPTION
  OPTION VALUE=mMarketing/OPTION
  OPTION VALUE=sSercices/OPTION
 /SELECTBR

 Please choose your working place:
 SELECT NAME=country
  OPTION VALUE=ca¢D[R3?j/OPTION
  OPTION VALUE=cn??¢Xe/OPTION
  OPTION VALUE-cr-o-U?n¡LE/OPTION
  OPTION VALUE=tw¢DxAW/OPTION
  OPTION VALUE=us?u¢Xe/OPTION
 /SELECTBR

 INPUT NAME=avail TYPE=checkbox¢Ds¡Le?W¡ÂZBR
 INPUT NAME=enter TYPE=submit VALUE=Enter
 /FORM
 /BODY
/HTML


jobapp_action.php
HTML
!jobapp_action.php--
 BODY

 ?php
  require(common.php);

  $submit=1;
  if (!$applicant){
   $submit=0;
   $applicant = BInvalid Name/B;
   }
  if (!check_email($email)) {
   $submit = 0;
   $email =BInvalid Email/B;
   }

  echo(BFollowing is your information:/B.
   NL.NL.
   Name: $applicant.NL.
   TEL: $phone.NL.
   E-Mail: $email. NL.
   Country:  );

   switch ($country) {
   case ca:
echo(Canada);
break;
   case cn :
echo(China);
break;
   case cr :
echo (Crostirica);
break;
   case tw :
echo (Taiwan);
break;
   default :
echo (USA);
   }

   echo (NL. Working Department: );

   switch ($position) {

   case a:
   echo (Accounting);
   break;
   case b:
   echo (Reparing);
   break;
   case h:
   echo (Human Resources);
   break;
   case m :
   echo (Marketing);
   break;
   default :
   echo (Services);
   }
   echo (NL);

   $avail=isset($avail);

  echo(¢Ds¡Le?W¡ÂZ: . ($avail ? ¢Di¢DH: ?¢G¡Âa));
  ?

  FORM method=post
   INPUT TYPE=submit VALUE=Submit
   INPUT TYPE=button VALUE=|^?W?@-? onclick=self.history.back()
  /FORM
 /BODY
/HTML








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




RE: [PHP] don't want to receive but email please

2002-07-08 Thread Lazor, Ed

So is this a new virus?

-Original Message-
From: Rodolfo Contreras T. [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 6:30 PM
To: [EMAIL PROTECTED]; PHP List
Subject: [PHP] don't want to receive but email please


 don't want to receive but email please don't want to receive but email
please don't want to receive but email please don't want to receive but
email please don't want to receive but email please don't want to receive
but email please don't want to receive but email please don't want to
receive but email please don't want to receive but email please don't want
to receive but email please don't want to receive but email please don't
want to receive but email please don't want to receive but email please
don't want to receive but email please don't want to receive but email
please don't want to receive but email please don't want to receive but
email please don't want to receive but email please don't want to receive
but email please don't want to receive but email please don't want to
receive but email please don't want to receive but email please don't want
to receive but email please don't want to receive but email please don't
want to receive but email please don't want to receive but email please
don't want to receive but email please don't want to receive but email
please don't want to receive but email please don't want to receive but
email please don't want to receive but email please don't want to receive
but email please don't want to receive but email please don't want to
receive but email please don't want to receive but email please don't want
to receive but email please don't want to receive but email please don't
want to receive but email please don't want to receive but email please
don't want to receive but email please don't want to receive but email
please don't want to receive but email please don't want to receive but
email please don't want to receive but email please don't want to receive
but email please don't want to receive but email please

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

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




RE: [PHP] $_REQUEST???

2002-07-08 Thread Lazor, Ed

Are you trying to find out whether the person is logged in?  You can also
test the cookie with the isset function.

-Original Message-
Can the $_REQUEST be trusted??  The documentation said it is the combination
of $_GET, $_POST, $_COOKIE  $_FILE.  If the PHPSESSID is found in
$_REQUEST, I can tell it is from $_COOKIE.  I wonder if the PHPSESSID can be
stored into $_REQUEST if hte $_COOKIE is unavailable or turned off?
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




Re: [PHP] php is not working with submit button

2002-07-08 Thread Analysis Solutions

Hi Terry:

On Mon, Jul 08, 2002 at 11:36:46PM +0800, Terry Cheung wrote:
 
 to the mysql database, the only problem is all the php pages seem likes do
 not response to the submit button, it just direct back to the same page

Then you're not writing your form correctly.

   form method=POST action=script.name.php
input type=submit name=Submit value=Do it /
   /form

Where, script.name.php is the name of the script you want the submitted 
data to be received by.  Then, in this example, script.name.php needs to 
handle the data:

   ?php
   echo 'This is the receiving end. Submit = ' . $_POST['Submit'];
   ?

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] php is not working with submit button

2002-07-08 Thread Philip Olson

This is an issue of the register_globals directive, the 
default went from off to on as of PHP 4.2.0  Either 
change your coding style or turn it back on.

  input type=text name=foo
  print $_POST['foo'];
  
$foo will exist if register_globals = on.  Search archives, 
google, the manual, etc. for this topic, it's been 
discussed a lot lately :)

Regards,
Philip Olson

On Mon, 8 Jul 2002, Terry Cheung wrote:

 Hi,
 
 I have just downloaded the latest source of apache, php, mod_ssl and
 mysql to build them all together. It can show the php page and can connect
 to the mysql database, the only problem is all the php pages seem likes do
 not response to the submit button, it just direct back to the same page and
 cannot get the data pass to the php script. I have tried the get  and
 post method. It works with my older version of apache with php and also I
 can submit data in the cgi-bin using the new apache. May anyone please help
 me? Thanks in advance.
 
 Terry
 
 
 
 
 -- 
 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] Variable not passing to second page

2002-07-08 Thread Philip Olson

Please don't repeat your questions, see the 
other post for details.  In short, it has to 
do with register_globals directive in php.ini

Regards,
Philip Olson


On Tue, 9 Jul 2002, Terry Cheung wrote:

 I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
 php script files. They can display successfully,  but whei I submit the
 data, they cannot pass to the second page even they can be shown in the URL
 with get method. here is one of my script
 
 
 jobapp.php
 HTML
 !-- jobapp.php--
  BODY
 
  ?php
   require(common.php)
  ?
  H1?php echo (COMPANY); ? jobs application form/H1
  PAre you finding a challenging career in the bicycle world?
 Still waiting for what?/P
  FORM NAME='frmJobApp' METHOD= get ACTION=jobapp_action.php
  Please Enter Your Name Here(Required):
  INPUT NAME=applicant TYPE=textBR
  Please enter your phone number:
  INPUT NAME=phone TYPE=textBR
  Please enter your E-mail address(Required):
  INPUT NAME=email TYPE=textBR
 
  Please choos the Department:
  SELECT NAME=position
   OPTION VALUE=aAccount/OPTION
   OPTION VALUE=bRepairing/OPTION
   OPTION VALUE=hHuman Resources/OPTION
   OPTION VALUE=mMarketing/OPTION
   OPTION VALUE=sSercices/OPTION
  /SELECTBR
 
  Please choose your working place:
  SELECT NAME=country
   OPTION VALUE=ca¢D[R3?j/OPTION
   OPTION VALUE=cn??¢Xe/OPTION
   OPTION VALUE-cr-o-U?n¡LE/OPTION
   OPTION VALUE=tw¢DxAW/OPTION
   OPTION VALUE=us?u¢Xe/OPTION
  /SELECTBR
 
  INPUT NAME=avail TYPE=checkbox¢Ds¡Le?W¡ÂZBR
  INPUT NAME=enter TYPE=submit VALUE=Enter
  /FORM
  /BODY
 /HTML
 
 
 jobapp_action.php
 HTML
 !jobapp_action.php--
  BODY
 
  ?php
   require(common.php);
 
   $submit=1;
   if (!$applicant){
$submit=0;
$applicant = BInvalid Name/B;
}
   if (!check_email($email)) {
$submit = 0;
$email =BInvalid Email/B;
}
 
   echo(BFollowing is your information:/B.
NL.NL.
Name: $applicant.NL.
TEL: $phone.NL.
E-Mail: $email. NL.
Country:  );
 
switch ($country) {
case ca:
 echo(Canada);
 break;
case cn :
 echo(China);
 break;
case cr :
 echo (Crostirica);
 break;
case tw :
 echo (Taiwan);
 break;
default :
 echo (USA);
}
 
echo (NL. Working Department: );
 
switch ($position) {
 
case a:
echo (Accounting);
break;
case b:
echo (Reparing);
break;
case h:
echo (Human Resources);
break;
case m :
echo (Marketing);
break;
default :
echo (Services);
}
echo (NL);
 
$avail=isset($avail);
 
   echo(¢Ds¡Le?W¡ÂZ: . ($avail ? ¢Di¢DH: ?¢G¡Âa));
   ?
 
   FORM method=post
INPUT TYPE=submit VALUE=Submit
INPUT TYPE=button VALUE=|^?W?@-? onclick=self.history.back()
   /FORM
  /BODY
 /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] Variable not passing to second page

2002-07-08 Thread Analysis Solutions

Hi Terry:

See the answer to the other thread you already started on this subject.  
In short, use the superglobal's to access the input: 
$_POST['variablename']

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] ini_set() broken?

2002-07-08 Thread Philip Olson

Hello Rasmus-

How do you suggest ini_set() document these differences?  Maybe 
the table at ini_set() could use another column, for descriptions 
and notes.  Also, could you give a concise description for the 
differences between local and master values?

Regards,
Philip Olson




On Mon, 8 Jul 2002, Rasmus Lerdorf wrote:

 Well, you can set it at runtime, it just won't do what you might expect.
 That doesn't mean that it may not be useful to be able to set it at
 runtime.  If, for example, you have register_globals off and you write an
 auto-prepend script, or even just a normal snippet of code that you insert
 into some other app at the beginning that emulates register_globals, then
 you may want to set register_globals = on at runtime so that any
 subsequent checks by the app will behave correctly.
 
 -Rasmus
 
 On Mon, 8 Jul 2002, Philip Olson wrote:
 
 
  You cannot set register_globals at runtime via
  ini_set().  The documentation goes off the PHP4
  source which is, to put it simply, a little wrong.
  The PHP4 source says register_globals is PHP_INI_ALL
  when in the real world it isn't.  .htaccess
  is as close as you'll get.
 
  The ini_set() docs are autogenerated and this issue
  is being looked into.  The correct docs on this are
  now in phpdoc CVS and will show up soon.
 
  In short, don't attempt to set register_globals
  at runtime as explained by a few in this thread,
  it won't fully work as expected.
 
  Regards,
  Philip Olson
 
 
 
 
  --
  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] Re: Help needed with hexdec();

2002-07-08 Thread frank

Thank you for your answer Richard, unfortunately the port from perl to
PHP didn't work out the way I wanted it to - probably mainly because of
the lack of perl knowledge here.

And yes you are right, the numbers I use are a lot bigger than
2147483647.

If anyone has an idea on how to treat the numbers or hex number for that
matter please don't hesitate. 

Anyway, I'm dropping the project for now.

Thanks again.

-Oorspronkelijk bericht-
Van: Richard Lynch [mailto:[EMAIL PROTECTED]] 
Verzonden: zondag 7 juli 2002 0:12
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Re: Help needed with hexdec();

I have to convert a perl script to PHP trying to do so I get negative
values from hexdec(), If I use (int)hexdec() the numbers aren't
negative
anymore, but they do not add up to what they should.

From the manual:  http://php.net/hexdec
The largest number that can be converted is 7fff or 2147483647 in
decimal.

I'm betting your numbers are bigger than that.

I wrote a less-limited hex2dec function years ago, and threw it up on
Sklar,
or, uhhh, the *other* PHP code repository.  There were really only two,
back
then... :-)

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
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] [OFF] Expiration Page

2002-07-08 Thread Lazor, Ed

Check HTML meta tags.  I'm not certain, but I think that's what you're
looking for.

-Original Message-
Please, How do I make for my webpage expires before time?
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

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




Re: [PHP] php +newlines+mysql

2002-07-08 Thread Analysis Solutions

On Mon, Jul 08, 2002 at 10:49:12AM +0300, adi wrote:

  $string=-line1\n -line2 \n-line3;
 
   $result2 = db_query(update table1 set column1= '$string' where ID =
 '$IDcurent') or db_die();
 When i try to view in a textarea control the new value from column1, the
 newlines disappear!

Werid.  Should work fine.  I just ran a test to make sure.  Yep, no 
problem.  Do a reveal source on your output and paste it into a reply to 
the list so we can see what you're getting.

Perhaps you're not actaully updating the data due to a mismatch in your
where ID = '$IDcurrent' statement (or some other similar problem)?  
Please make sure of that (by changing the test string to something else)  
before doing anything else.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] add to basket

2002-07-08 Thread Analysis Solutions

I'd put a conditional include on the top of the present script.

   if ( !empty($_POST['addtocart']) ) {
  include('./the.update.script.php');
   }

Then redisplay the existing page with the new information.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] php is not working with submit button

2002-07-08 Thread Terry Cheung

It works, really Thanks a lot to you all!! I will try to modify all my
script.
Philip Olson [EMAIL PROTECTED]
???:[EMAIL PROTECTED]
 This is an issue of the register_globals directive, the
 default went from off to on as of PHP 4.2.0  Either
 change your coding style or turn it back on.

   input type=text name=foo
   print $_POST['foo'];

 $foo will exist if register_globals = on.  Search archives,
 google, the manual, etc. for this topic, it's been
 discussed a lot lately :)

 Regards,
 Philip Olson

 On Mon, 8 Jul 2002, Terry Cheung wrote:

  Hi,
 
  I have just downloaded the latest source of apache, php, mod_ssl
and
  mysql to build them all together. It can show the php page and can
connect
  to the mysql database, the only problem is all the php pages seem likes
do
  not response to the submit button, it just direct back to the same page
and
  cannot get the data pass to the php script. I have tried the get  and
  post method. It works with my older version of apache with php and
also I
  can submit data in the cgi-bin using the new apache. May anyone please
help
  me? Thanks in advance.
 
  Terry
 
 
 
 
  --
  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] hide a select tag

2002-07-08 Thread Anil Garg

Hi,

sorry for going a lil out of way of php.
can i hide a drop down menu.(as i always want to pass the default value
selected in the drop down.

thanx and regards
anil


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




Re: [PHP] hide a select tag

2002-07-08 Thread Martin Clifford

Just create a hidden form field with the value you want to pass.

input type=hidden name=name value=value to pass /

HTH

Martin

 Anil Garg [EMAIL PROTECTED] 07/08/02 01:35PM 
Hi,

sorry for going a lil out of way of php.
can i hide a drop down menu.(as i always want to pass the default value
selected in the drop down.

thanx and regards
anil


-- 
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] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf

master is the top-level default value set in either your php.ini if you
have that file and have a specific value set, or ir not it is the PHP
default for the config value.  The local is the per-request setting set
either in httpd.conf, .htaccess or locally in the script.


On Mon, 8 Jul 2002, Philip Olson wrote:

 Hello Rasmus-

 How do you suggest ini_set() document these differences?  Maybe
 the table at ini_set() could use another column, for descriptions
 and notes.  Also, could you give a concise description for the
 differences between local and master values?

 Regards,
 Philip Olson




 On Mon, 8 Jul 2002, Rasmus Lerdorf wrote:

  Well, you can set it at runtime, it just won't do what you might expect.
  That doesn't mean that it may not be useful to be able to set it at
  runtime.  If, for example, you have register_globals off and you write an
  auto-prepend script, or even just a normal snippet of code that you insert
  into some other app at the beginning that emulates register_globals, then
  you may want to set register_globals = on at runtime so that any
  subsequent checks by the app will behave correctly.
 
  -Rasmus
 
  On Mon, 8 Jul 2002, Philip Olson wrote:
 
  
   You cannot set register_globals at runtime via
   ini_set().  The documentation goes off the PHP4
   source which is, to put it simply, a little wrong.
   The PHP4 source says register_globals is PHP_INI_ALL
   when in the real world it isn't.  .htaccess
   is as close as you'll get.
  
   The ini_set() docs are autogenerated and this issue
   is being looked into.  The correct docs on this are
   now in phpdoc CVS and will show up soon.
  
   In short, don't attempt to set register_globals
   at runtime as explained by a few in this thread,
   it won't fully work as expected.
  
   Regards,
   Philip Olson
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 



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




[PHP] Re: hide a select tag

2002-07-08 Thread colin mcdonald

why not use a hidden field instead of a select?

Anil Garg wrote:
 Hi,
 
 sorry for going a lil out of way of php.
 can i hide a drop down menu.(as i always want to pass the default value
 selected in the drop down.
 
 thanx and regards
 anil
 



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




Re: [PHP] Linux Newsgroup???

2002-07-08 Thread Chris Hewitt

Scott,

There are many mailing lists at 
https://listman.redhat.com/mailman/listinfo though mainly RedHat 
orientated. I expect other distributions have their equivalents too.

There are also those a vger.kernel.org, which includes a linux-newbie 
one, the others tending to more aimed at the kernel developers.

Chris

Scott Fletcher wrote:

Hey!

Is there a Linux newsgroup?  A place where people can send emails or posting
about Linux, like tech support, programming, installation, feedback,
advices, work around, etc.  Just like hte same concept as the PHP newsgroup
here.

Thanks,
 FletchSOD






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




  1   2   3   >