php-general Digest 23 Apr 2005 14:22:26 -0000 Issue 3414

2005-04-23 Thread php-general-digest-help

php-general Digest 23 Apr 2005 14:22:26 - Issue 3414

Topics (messages 213708 through 213720):

Re: problem with the pager class not found
213708 by: Richard Lynch

Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] URL  encoding in 
XSL - Yes, a PHP question
213709 by: Richard Lynch

Re: image maps in PHP
213710 by: John Coppens
213711 by: John Coppens

Re: Is it possible to save a file with UTF-8 encoding and no BOM using PHP?
213712 by: Jon M.
213713 by: Jon M.
213714 by: Rasmus Lerdorf

Tesing Gzip files
213715 by: Prathaban Mookiah

Re: Documentation for VAR
213716 by: Satyam

about session
213717 by: bitblackbug.sohu.com

paste part of mp3 to over an mp3
213718 by: QT

»Ø¸´:Re: [PHP] about session
213719 by: bitblackbug.sohu.com

Dynamic Generating reports to print
213720 by: mbneto

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
---BeginMessage---
On Fri, April 22, 2005 6:23 pm, Matthew Weier O'Phinney said:
 If it *does* match, then maybe your Pager.php file is messed up and the
 class is missing a closing bracket, so your script thinks you're still
 in
 the middle of your class definition.

 I'm guessing this is probably *not* the case... it's a PEAR package, and
 if it's considered stable, this is *highly* unlikely. (Plus, if it's the
 stable version, then I'm running it on my production servers, and I
 *know* it's working fine!)

In that case, I'd be looking for some kind of conditional around the
require 'Pager.php' that is making it not actually get included at all...

Put print statements right before and after the require line and be sure.

-- 
Like Music?
http://l-i-e.com/artists.htm
---End Message---
---BeginMessage---
On Fri, April 22, 2005 3:33 pm, Brian Dunning said:
 ?php
   $ItemLink = urlencode($ItemLink);
 ?

 Are you saying to embed that within the XSL? Will it process, and will
 the XSL variable be valid for PHP?

No.

I got NO IDEA how you would do this in XML.

Sorry, maybe ask on an XML list. :-^

-- 
Like Music?
http://l-i-e.com/artists.htm
---End Message---
---BeginMessage---
On Fri, 22 Apr 2005 19:11:23 +0530
[EMAIL PROTECTED] (Dasmeet Singh) wrote:

 Actually I am not able to make image maps because of uneven state 
 boundaries..
 
 Can you please suggest some tools... I haven't used any yet...

Did you check GIMP? It has an option to make HTML image maps. 
Check Filters|Web|ImageMap

John

 
 Thanks
 
 -
 Free Website Promotion - A Complete Guide
 http://hostwindow.info/web-hosting/9/free-website-promotion/1/
 
 
 Mike wrote:
 Hi!
 I need to create an image map on a country map, where people 
 can click on any state and get some info related to it.. In 
 such case the regular polygon/circle/rectengle image map wont 
 do bcoz of shapes of state..
 
 I guess this must be possible someway in PHP.. please tell me 
 if you have any idea how to go abt this..
 
  
  Is the problem you're experiencing that the image map isn't being
  built properly or are you passing information to it that does not
  appear to be consistant.
  
  If it's the former, then PHP has nothing to do with that. I'm sure
  you can find some tools to generate image maps for you. There have
  always been free ones with a minimum of effort. 
  
  If you're having problem with PHP in the mix, can you describe the PHP
  problem, provide some code, some sample output, etc.? 
  
  I've used image maps in the past (though I try to stay away from
  them) and you can create a link with virtually any polygon if you
  have the patience to may out the plot points. You could easily create
  a star with many, many points and have it be clickable - which would
  indicate that most states would be a piece of cake. 
  
  -M
---End Message---
---BeginMessage---
On Fri, 22 Apr 2005 19:11:23 +0530
[EMAIL PROTECTED] (Dasmeet Singh) wrote:

 Actually I am not able to make image maps because of uneven state 
 boundaries..
 
 Can you please suggest some tools... I haven't used any yet...

Did you check GIMP? It has an option to make HTML image maps. 
Check Filters|Web|ImageMap

John

 
 Thanks
 
 -
 Free Website Promotion - A Complete Guide
 http://hostwindow.info/web-hosting/9/free-website-promotion/1/
 
 
 Mike wrote:
 Hi!
 I need to create an image map on a country map, where people 
 can click on any state and get some info related to it.. In 
 such case the regular polygon/circle/rectengle image map wont 
 do bcoz of shapes of state..
 
 I guess this must be possible someway in PHP.. please tell me 
 if you have any idea how to go abt this..
 
  
  Is the problem you're experiencing that the image map isn't being
  built properly or are you passing information to it that does 

[PHP] PHP cron sendmail

2005-04-23 Thread Richard Lynch
Somewhat OT...

Okay, maybe a lot OT...

I have these cron jobs on a computer, and I want the email output from them.

But I don't want sendmail running 24/7, and when it does run, I'd just as
soon it *ONLY* processed email and sent it out, without even opening up
port 25 and listening.

I guess the port 25 stuff is not too terribly important, behind 2
firewalls and all, but...

Anyway, I definitely want it to run and process however much it can, but
to STOP at a pre-determined time.

This is for the computer in my sound booth, and I only want it running
when we are not trying to record live music or burn CDs.

I've Google and read a fair amount of stuff, most of which is giving me a
headache rather than suggesting a solution...

Is there some command line flags I can use to make sendmail run and send
out just *ONE* message from the /var/mail/mqueue or whatever, and then
QUIT and do nothing else?

I can take care of shaping the behaviour from that point using cron and
PHP to run sendmail when I want...

THANKS and please reply off-list as I'm sure most folks don't want to read
this.

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



Re: [PHP] modify array data

2005-04-23 Thread Richard Lynch
On Fri, April 22, 2005 8:46 am, Jon Aston said:
 Is there a way to easily rotate array data?

 what I want to do is
 change from

 bob | bill | frank
 joe | jose | sam
 sally | jim | kim

 to
 |  | | frank||  |
 |  |bill | | sam|  |
 |bob| | jose  |   | kim|
 |  |joe| |jim   |  |
 |  | | sally || |

 is there an easy way to do this?
 the data and arraysize will vary so I was looking for a way that I could
 have php do it without having to make script for different array sizes.

http://php.net/array

Look at array_pop and array_push and count and array_slice and
array_splice and array_shift.

I really don't understand your BEFORE/AFTER diagrams at all, since it
pretty much looks random to me...  In which case you want
http://php.net/shuffle

-- 
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] SSL use

2005-04-23 Thread ruel.cima
 hi,

 im handling some important information that needs to be stored in my
 postgresql database via a php script. i´ve been reading the mails sent on
 this mailing list on SSL use. my postgresql server allows SSL connections
 but im not sure how to make use of this.id like to know more about ssl and
 how to take advantage of its security features. any references?

  from my php script, do i need to make a special connection to the database
 or is the same e.g pg_connect(host= localhost dbname=test user=p
 password=p)?

 is my information automatically transfered in an encrypted fashion?

 thnax

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



Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-23 Thread Richard Lynch
On Fri, April 22, 2005 7:31 am, Matthew Weier O'Phinney said:
 Actually, LIMIT is in ANSI SQL.

Either the ANSI standard changed, or Rasmus needs to update his Bio...

http://lerdorf.com/bio.php

...he can be blamed for the ANSI92 SQL-defying LIMIT clause in mSQL 1.x
which has now, at least conceptually, crept into both MySQL and
PostgreSQL.

But, hey, I'm not gonna actually READ the ANSI standard to find out -- I'd
rather worry about what actually *WORKS* than what the SQL standard is,
which, sadly, is seldom easily reconciled with Real-Life (tm).

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



Re: [PHP] Php defense

2005-04-23 Thread Richard Lynch
On Fri, April 22, 2005 6:58 am, Pablo D Marotta said:
 I`m defending the language, but people here want to migrate to asp..
 They just keep on saying php is not used for huge corporation solutions,
 there
 asp goes better.

Sounds to me like they've already decided on non-rational basis, and are
justifying their choice, rather than making an attempt at an informed
decision...

Rational discourse may not be particularly effective...

I'd be starting a job search, if I was in your spot :-v

Ain't enough money in the world to make me do ASP/VB again.

-- 
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] Tesing Gzip files

2005-04-23 Thread Prathaban Mookiah
Hello,

Is there a way to test if a .gz file is in a valid format. Functions like 
gzread, gzfile don't seem to care if the file is corrupt or not. 

gzeof also didn't work for me. I guess it is because it does not check for a 
valid .gz termination. Any ideas to go about doing this?

Thanks in advance.

Cheers,

Prathap

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



Re: [PHP] Documentation for VAR

2005-04-23 Thread Satyam
I was looking for formal documentation because I am doing a pre-processor 
for some PHP extensions and wanted to know the right and formal description 
for it.  Nevertheless, I think your examples below cover most cases, a help 
much appreciated.  Thanks

Satyam



Jochem Maas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Richard Davey wrote:
 Hello Satyam,

 Friday, April 22, 2005, 3:59:38 PM, you wrote:

 S I've been going through the manual and haven't found 'var'
 S documented anywhere, as far as I found, it is just used, and that's
 S it. It seems it first appears when it talks about Classes, and it
 S is just used in the examples as if everyone knew what var is
 S supposed to do.

 It's a constant initializer - which is both an accurate and
 misleading title at the same time :) It will initialise a variable to
 be constant through-out your entire class (meaning any method can
 access it) but unlike true PHP constants (those created with define)
 the value of the variable can be manipulated from just about anywhere.


 indeed in php you can do the following instead:

 ?

 error_reporting( E_ALL  E_STRICT );
 class Test
 {
 // this first var (commented out) should (I thought) act as if defined
 // 'public' - it doesn't given a parse error with php -l, but does 
 when run.
 // I haven't run into this problem in 1.5 years of writing php5...
 // I must be having a brain freeze :-/
 //$myVar;

 // publically accessible instances variables
 public $myVar1; // not initialized with a value
 public $myVar2 = 2; // initialized with a value

 // an instance variable thats only available
 // from within _all_ methods of this object.
 // .. methods could be defined in subclasses or parent-classes
 protected $myVar3 = 3;

 // an instance variable that is only available to the
 // methods defined in _this_ class
 private $myVar4 = 4;

 // a variable with class scope (all instances see the same value),
 // publically accessible
 static $myVar5 = 5;
 static public $myVar6 = 6;

 // a variable with class scope (all instances see the same value),
 // thats only available from within _all_ methods of this object.
 static protected $myVar7 = 7;

 // a variable with class scope (all instances see the same value),
 // thats only available from methods defined in _this_ class
 static private $myVar8 = 8;

 public function get4() { return $this-myVar4; }
 public function get8() { return self::$myVar8; }
 }

 // basic usage examples:

 var_dump( ($t = new Test), $t-myVar2, $t-get4(), Test::$myVar6, 
 $t-get8() );

 ?

 I can thoroughly recommend php5's much improved object model,
 try other variations of calls to the defined 'myVar's, also try doing
 with sublcasses, see what does/doesn't work, have fun :-)


 It is of course PHP4 only and is depreciated in PHP5.

 Best regards,

 Richard Davey 

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



[PHP] about session

2005-04-23 Thread bitblackbug



hi,everyone.
can someone tell me the differences between the $_SESSION['time'] and session_register.
thanksÉÁµçÓʼþ£¬¿ìËÙÎȶ¨£¬°²È«¿É¿¿£¡£¡ÓÐÎÒΪÄ㵲סÀ¬»øÓʼþ£¡


[PHP] paste part of mp3 to over an mp3

2005-04-23 Thread QT
Dear Sirs,

Do you know any classes to paste some part of mp3 to over another mp3?

Best Regards

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



[PHP] :Re: [PHP] about session

2005-04-23 Thread bitblackbug



Dear Devraj,
thank you!
that 's say I must session_register at fitst ,and use $_SESSION['time'] at secoend?
and How can i get the value of the form's element? 
just use $time ?


now I have a form named form1 in file1.php , whose active="file1.php",in  form1,it have a text input .
how can i get the text input's value when the submit button 's clicked?


From: Devraj Mukherjee 
To: [EMAIL PROTECTED] 
Subject: Re: [PHP] about session
Sent: Sat Apr 23 18:19:14 CST 2005

> 
> $_SESSION['time'] accesses or sets the value of the session variable
> time once its has been registered by session_register.
> 
> In short, you should use session_register to regiter the variable before
> you use it.
> 
> Devraj
> 
> [EMAIL PROTECTED] wrote:
> > hi,everyone.
> > can someone tell me the differences between the $_SESSION['time'] and session_register.
> > thanks
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Devraj Mukherjee ([EMAIL PROTECTED])
> Eternity Technologies Pty. Ltd. ACN 107 600 975
> P O Box 5949 Wagga Wagga NSW 2650 Australia
> Voice: +61-2-69717131 / Fax: +61-2-69251039
> http://www.eternitytechnologies.com/
> 
> 
ÉÁµçÓʼþ£¬¿ìËÙÎȶ¨£¬°²È«¿É¿¿£¡£¡ÓÐÎÒΪÄ㵲סÀ¬»øÓʼþ£¡


[PHP] Re: Php defense

2005-04-23 Thread Matthew Weier O'Phinney
* Pablo D Marotta [EMAIL PROTECTED]:
 I`m defending the language, but people here want to migrate to asp..
 They just keep on saying php is not used for huge corporation
 solutions, there asp goes better.

 I know it isn´t correct, but I don´t know much about well-known
 websites using php technology. (I just don´t navigate enough time to
 know it) I think that could help a lot, since this people is highly
 influenced by that kind of facts.. (I mean, knowing that other
 companies trust this language to manage critical information).

I'm not allowed to say what company it's for, but we just finished
building a site for a Fortune 50 company.

Others have mentioned google and Y!, which are of course very prominent.
Recently, IBM has remarked that it's endorsing PHP and throwing money at
PHP development to make it more enterprise ready.

Another argument I'd make is that PHP can run on a variety of web
servers, not just IIS, which give you more choice in your web
architecture.

ASP is certainly a fine language, but my personal opinion is that it
locks you in to a single architecture -- one that costs $$$ and which
has limited scalability. Those reasons alone are enough to look at other
languages.

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

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



Re: [PHP] Php defense

2005-04-23 Thread Dasmeet Singh
wikipedia.org also uses PHP
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
-K. wrote:
As i recall Yahoo uses PHP. Quick Google turned up:
http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm
Also i remember it was a pretty big deal when
Friendster switched to PHP. And the resulting
improvement in performance was pretty dramatic.
O'Reilly has a good article.
http://www.oreillynet.com/pub/wlg/5155
Google around some, especially on the Friendster
switch, which as I recall caused quite a stir, for
more information.

-k.
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] MSSqlServer table/field information

2005-04-23 Thread Chris Boget
Is there a way to programatically get information about a 
specific table and/or field?  And also any constraints that 
a field has?

thnx,
Chris

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



RE: [PHP] MSSqlServer table/field information

2005-04-23 Thread Mark Rees
Look into the INFORMATION SCHEMA views in SQL Books Online for a
starting point.

Mark

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED] 
Sent: 22 April 2005 15:51
To: PHP General
Subject: [PHP] MSSqlServer table/field information


Is there a way to programatically get information about a 
specific table and/or field?  And also any constraints that 
a field has?

thnx,
Chris

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

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

EOE

**
**


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



Re: [PHP] Re: reverse MD5 ???

2005-04-23 Thread Satyam
If you are happy with infinite answers, I guess that is Ok.  In practice, 
since you would probably wouldn't expect numbers (or strings) infinetly 
long, assuming that you just have N possible initial values, you would have 
N/3 possible answers.

I thought the question was about getting one answer.


Greg Donald [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
On 4/21/05, Satyam [EMAIL PROTECTED] wrote:
 If I tell you that dividing a certain number by three gives you a 
 remainder
 of 2, would you be able to guess the first number?

Yes.  5, 8, 11, 14, etc.

 Same thing with MD5, it
 is just one way, it can't be reversed.

MD5 collisions were found last year:
http://cryptography.hyperlink.cz/md5/MD5_collisions.pdf

Just a matter of time/cpu power.


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

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



[PHP] Documentation for VAR

2005-04-23 Thread Satyam
I've been going through the manual and haven't found 'var' documented 
anywhere, as far as I found, it is just used, and that's it.  It seems it 
first appears when it talks about Classes, and it is just used in the 
examples as if everyone knew what var is supposed to do.

Thanks

Satyam

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



Re: [PHP] MSSqlServer table/field information

2005-04-23 Thread tg-php
http://www.sqlzoo.net/howto/source/z.dir/i12meta.xml

Check out the META DATA section of this page (link above).  I used it to create 
a database 'walker' app that lets you search for table names, column names, 
etc.  I was working on a HUGE database that wasn't documented well and nobody 
could give me good answers on how things joined..haha.  so this meta data was 
very helpful.

It's basically stored in a table in SQL Server, all the table/column 
information.  So it's super simple to get the information you want.

Check out this query:

SELECT * FROM sysobjects

good luck!

-TG

= = = Original message = = =

Is there a way to programatically get information about a 
specific table and/or field?  And also any constraints that 
a field has?

thnx,
Chris

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


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



RE: [PHP] Documentation for VAR

2005-04-23 Thread Jay Blanchard
[snip]
I've been going through the manual and haven't found 'var' documented 
anywhere, as far as I found, it is just used, and that's it.  It seems
it 
first appears when it talks about Classes, and it is just used in the 
examples as if everyone knew what var is supposed to do.
[/snip]

It is just a variable name.

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



Re: [PHP] Documentation for VAR

2005-04-23 Thread Richard Davey
Hello Satyam,

Friday, April 22, 2005, 3:59:38 PM, you wrote:

S I've been going through the manual and haven't found 'var'
S documented anywhere, as far as I found, it is just used, and that's
S it. It seems it first appears when it talks about Classes, and it
S is just used in the examples as if everyone knew what var is
S supposed to do.

It's a constant initializer - which is both an accurate and
misleading title at the same time :) It will initialise a variable to
be constant through-out your entire class (meaning any method can
access it) but unlike true PHP constants (those created with define)
the value of the variable can be manipulated from just about anywhere.

It is of course PHP4 only and is depreciated in PHP5.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

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



[PHP] Dynamic Generating reports to print

2005-04-23 Thread mbneto
Hi,

I'd like to generate reports (with tabular data) to print from php. 
Now I am using a mixed solution where I save the data in a reports
database and I have a delphi app installed pooling the db for pending
reports and print it.

My plan is move away from the current solution but I am still confused
of how am I going to get control of the layout of the report. 
Generate a PDF ? Use CSS ?

Some of the trick parts are, for instance, to have the same header
in all pages of the same report, if I have tabular data greater than
the height of the page continue in the next page etc.

Any tips (or code) ?

thanks.

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



Re: [PHP] Dynamic Generating reports to print

2005-04-23 Thread Steve Brown
 My plan is move away from the current solution but I am still confused
 of how am I going to get control of the layout of the report.
 Generate a PDF ? Use CSS ?
 
 Some of the trick parts are, for instance, to have the same header
 in all pages of the same report, if I have tabular data greater than
 the height of the page continue in the next page etc.

I used to encounter the same problems with reporting in our business
software.  You can generate reports and spit out HTML in a new window
and have the user print the report from the browser, but that has many
drawbacks.  It only works with simple data sets, its difficult (or
impossible) to control page breaks, lack of precision placing, etc.

Now I use FPDF to generate PDF reports (http://www.fpdf.org/).  Its
free, easy to use, and pretty flexible.  It allows you to do precision
placement on a page, add headers, footers, etc, etc, etc.  Be sure to
check out the Scripts section, its got a bunch of useful tips for
expanding functionality of the classes.  There is another commerical
product out there (can't thin of the name right now) that is supposed
to be faster, but FPDF is pretty fast in our applications.

I also use the JPGraph package for generating graphs
(http://www.aditus.nu/jpgraph/).  This is *really* slick.  Its free
for personal use, about $125 for commercial use.  You need to install
some additional PHP libraries (JPEG, PNG, GD at least), but its fast
and easy.  I love playing around with this product because the
possibilities for what you can do are almost endless.

HTH,
Steve

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



[PHP] Strange problem with picture Upload

2005-04-23 Thread Labunski
Hi guys,
I have to say, I've written so many scripts that had file upload functions 
included,
but this time something strange is happening.

The script passes the IMAGE_TYPE check, and picture's name stores in the 
database (so I guess the picture should have been stored in the dir.), but 
when I look at the ftp - there's no picture in the upload directory.

Chmod of the directory is 777;

Here it is:

$realdir = $_SERVER['DOCUMENT_ROOT'].'/img/';
$uploadfile = $realdir. basename($_FILES['postbilde']['name']);

if (move_uploaded_file($_FILES['postbilde']['tmp_name'], 
$uploadfile)) {
   $put_name_en = $_POST['subject_en'];

if (!empty($put_name_en)) {
$image = basename($_FILES['postbilde']['name']);
$check_image = 
$_SERVER['DOCUMENT_ROOT'].'/img/'.$image;

if( (exif_imagetype($check_image) == 
IMAGETYPE_JPEG)||(exif_imagetype($check_image) == IMAGETYPE_GIF) ){
$put_img = $image;
}else{
$img_root = $_SERVER['DOCUMENT_ROOT'].'/img/';
$kick = $img_root.$image;
unlink($kick);
$put_img = '';
}

mysql_query(INSERT INTO data (subject_en, img) 
VALUES ('$put_name_en', '$put_img')) OR die(mysql_error());

echo 'META HTTP-EQUIV=Refresh 
CONTENT=0;URL=update.php';
}
} else {
   echo The upload was unsuccessful !;
}


Sorry for my bad english,
Thank you in advance,
Lab.

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



[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] [suspicious - maybe spam] URL encoding in XSL - Yes, a PHP question

2005-04-23 Thread Christian Stocker
On 4/23/05, Brian Dunning [EMAIL PROTECTED] wrote:
 All the resources I've found on the web for URL encoding values within
 an XSL stylesheet are either .NET or Java, so I'm looking for some help
 with how to do this using PHP's special flavor of XML/XSL.
 
 Within the XSL doc, I've got:
 
 xsl:variable name=ItemLink select=concat($MediaPlexURL, Link)/
 a
 href=http://www.anrdoezrs.net/click-1692198-5463217?loc={$ItemLink};

Are you using sablotron in PHP 4? Or the domxslt support in PHP 4? Or
already PHP 5?

If you use one of the later, you could use
http://exslt.org/str/functions/encode-uri/index.html, this should be
available in libxslt

With PHP 5, you can also call PHP functions from within xslt:

http://ch2.php.net/manual/en/function.xsl-xsltprocessor-register-php-functions.php

Read the usercomments for more info

chregu
 
 and $ItemLink needs to be URL encoded. How do I do this on my PHP box?
 Sorry no Java or .NET available...   :)
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB

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



Re: [PHP] Can I use $_REQUEST for file uploads?

2005-04-23 Thread Philip Olson
 Thanks for the reponse. I tested again, but it was not the problem
 with ENCTYPE. I am getting file with $_FILES. I think this is due to
 CGI configuration if not with php.ini. Because when I check the
 version by using PHP -v command, it shows 4.3.10 (cgi) but when
 check that using phpinfo() function, it is showing as PHP 4.2.2. Why
 the difference? I am working in that view to find the solution.
 Currently I got a temporary solution. I am jsut copying from $_FILES
 to $_REQUEST at the very begining of the script. Because I can't
 change all the scripts now.

Because you have two different versions of PHP installed. In
otherwords, the CGI version and most likely the module
version.

Now to answer your question, here's a quote from the 
PHP Manual:

 Note: Prior to PHP 4.3.0, $_FILES information was 
   also included in $_REQUEST.

So, $_FILES is no longer part of $_REQUEST.

Regards,
Philip

http://php.net/manual/en/reserved.variables.php#reserved.variables.request

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



[PHP] PHP vs ASP .NET

2005-04-23 Thread Reynier Perez Mira
Hi list:

I have a problem with ASP .NET community in my Universty and I need to solve 
it. The thing is that they say me that ASP .NET is better than PHP, so I need 
information to response they about this theme. Can you put me some sites, 
statics, intrview to big personalities, articles to response ?

Regards

 

 

Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 

 



[PHP] Re: SSL use

2005-04-23 Thread Bruno Wolff III
On Fri, Apr 22, 2005 at 16:38:29 -0400,
  ruel.cima [EMAIL PROTECTED] wrote:
  hi,
 
  im handling some important information that needs to be stored in my
  postgresql database via a php script. i´ve been reading the mails sent on
  this mailing list on SSL use. my postgresql server allows SSL connections
  but im not sure how to make use of this.id like to know more about ssl and
  how to take advantage of its security features. any references?
 
   from my php script, do i need to make a special connection to the database
  or is the same e.g pg_connect(host= localhost dbname=test user=p
  password=p)?

If postgres is running on the same machine as php there isn't much point
in using encryption of the connection. You are probably better off using
domain sockets instead of a network connection in this case.

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



Re: [PHP] Zend Certification Exam

2005-04-23 Thread M Saleh EG
Anyone who passesd?

On 4/22/05, Aaron Gould [EMAIL PROTECTED] wrote:
 
 M Saleh EG wrote:
  Hi everyone.. kind of OT
  Anyone who's passed it in the list? I'm having my exam on May 7th. Gone
  through the guide book once. Sounds easy according to the guide.
  I dont think it's as easy as i'm thinking it is any experience?
  Thanx in advance.
 
 My advice -- take the full amount of time given to you, and go back over
 your answers should you have time left over.
 
 I took it at the 2005 PHP Quebec Conference (it was part of the fee).
 I finished it in an hour, but had 90 minutes alotted. I did not pass,
 and still regret not taking the time to go back over the answers I was
 unsure of. I think that if I had taken the full time, I would have had
 a better shot.
 
 You'll likely have better luck, as I normally don't do well with exams
 in general.
 
 As an aside, I think the exam needs to mature a bit more. I was confused
 a few times, and found a few questions that involved cases I had
 certainly experienced in five plus years of PHP development. I'm sure
 that'll happen in due time as the certification is only a couple years 
 old.
 
 --
 Aaron Gould
 Programmer/Systems Administrator
 PARTS CANADA
 
 


-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] Zend Certification Exam

2005-04-23 Thread Chris Shiflett
M Saleh EG wrote:
Anyone who's passed it in the list? I'm having my exam on May 7th. Gone
through the guide book once. Sounds easy according to the guide.
I dont think it's as easy as i'm thinking it is any experience?
If you think it's easy based on the guide, you're probably fine, 
particularly if you think the practice questions were easy. Those 
questions were ones that were thrown out due to being too tricky or 
difficult, so the questions on the exam are more straightforward.

I posted the answers to Zend's self test (plus explanations), in case 
you fine it helpful:

http://shiflett.org/archive/115
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread Mark Charette
Reynier Perez Mira wrote:
Hi list:
I have a problem with ASP .NET community in my Universty and I need to solve it. The thing is that they say me that ASP .NET is better than PHP, so I need information to response they about this theme. Can you put me some sites, statics, intrview to big personalities, articles to response ?
Rather than get into an open ended discussion/argument, perhaps it would 
be best to ask the community why ASP.NET is better? Perhaps for the 
usage they envision is _is_ better, perhaps not.

I have found over the past 32 years that passionate 
discussions/arguments over what language is better than another to be 
less than constructive anyway. Better to just do your work and let it 
speak for itself.

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


Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread hanez
On Saturday 23 April 2005 19:33, Reynier Perez Mira wrote:
 Hi list:

 I have a problem with ASP .NET community in my Universty and I need to
 solve it. The thing is that they say me that ASP .NET is better than PHP,
 so I need information to response they about this theme. Can you put me
 some sites, statics, intrview to big personalities, articles to response ?

My meaning about this:

ASP .NET is not just a scripting language but more a plattform for Enterprise 
(web) applications.  It really has many more features then PHP and i would 
compare ASP .NET more with JAVA/J2EE.  I don't know much about ASP .NET since 
i am more familiar with PHP and maybe some little bit JAVA.  I think it is 
better to compare with a scripting language like Python or Ruby.  You could 
compare the old versions of ASP with PHP because this was nearly the same.  I 
never have coded with ASP since i very rarely touch a windows box but it 
looked like VisualBasic code.

Take a look here (Search Google: asp .net vs php5 ):

http://www.oracle.com/technology/pub/articles/hull_asp.html


Regards


Johannes Findeisen

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



Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread M Saleh EG
I don't recommand this article at Oracle at all!!
It's a very biased one and intends to misguide as a marketting gig. I'd like 
you to read healthy articles that truely compare. BTW
ASP.nethttp://ASP.netcan not be compared with PHP5 because they are
totaly different.
It's like comparing Apples and Oranges. PHP can be compared to ASP not 
ASP.net http://ASP.net because it's totaly a different thing. HTH. Been 
there, done that.

On 4/23/05, hanez [EMAIL PROTECTED] wrote:
 
 On Saturday 23 April 2005 19:33, Reynier Perez Mira wrote:
  Hi list:
 
  I have a problem with ASP .NET community in my Universty and I need to
  solve it. The thing is that they say me that ASP .NET is better than 
 PHP,
  so I need information to response they about this theme. Can you put me
  some sites, statics, intrview to big personalities, articles to response 
 ?
 
 My meaning about this:
 
 ASP .NET is not just a scripting language but more a plattform for 
 Enterprise
 (web) applications. It really has many more features then PHP and i would
 compare ASP .NET more with JAVA/J2EE. I don't know much about ASP .NET 
 since
 i am more familiar with PHP and maybe some little bit JAVA. I think it is
 better to compare with a scripting language like Python or Ruby. You could
 compare the old versions of ASP with PHP because this was nearly the same. 
 I
 never have coded with ASP since i very rarely touch a windows box but it
 looked like VisualBasic code.
 
 Take a look here (Search Google: asp .net vs php5 ):
 
 http://www.oracle.com/technology/pub/articles/hull_asp.html
 
 Regards
 
 Johannes Findeisen
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
M.Saleh.E.G
97150-4779817


[PHP] Re: PHP vs ASP .NET

2005-04-23 Thread Satyam
Search for PHP defense in the subject line for a thread that is/was 
running since a few days ago.

Satyam

Reynier Perez Mira [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
Hi list:

I have a problem with ASP .NET community in my Universty and I need to solve 
it. The thing is that they say me that ASP .NET is better than PHP, so I 
need information to response they about this theme. Can you put me some 
sites, statics, intrview to big personalities, articles to response ?

Regards





Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy.

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



Re: [PHP] Dynamic Generating reports to print

2005-04-23 Thread Satyam
The commercial product you might be thinking off might be Crystal Reports: 
http://www.businessobjects.com/.  I have not worked with their product since 
their version 7, but I remember that if you wanted a report in HTML what 
they did is send zillions of absolutely positioned divs with width and 
height spec and assembled the page from those.  It did not require any 
plug-in installed on the client side.  It used the page-break-after 
or -before CSS attribute for page breaks.

Satyam



Steve Brown [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 My plan is move away from the current solution but I am still confused
 of how am I going to get control of the layout of the report.
 Generate a PDF ? Use CSS ?

 Some of the trick parts are, for instance, to have the same header
 in all pages of the same report, if I have tabular data greater than
 the height of the page continue in the next page etc.

I used to encounter the same problems with reporting in our business
software.  You can generate reports and spit out HTML in a new window
and have the user print the report from the browser, but that has many
drawbacks.  It only works with simple data sets, its difficult (or
impossible) to control page breaks, lack of precision placing, etc.

Now I use FPDF to generate PDF reports (http://www.fpdf.org/).  Its
free, easy to use, and pretty flexible.  It allows you to do precision
placement on a page, add headers, footers, etc, etc, etc.  Be sure to
check out the Scripts section, its got a bunch of useful tips for
expanding functionality of the classes.  There is another commerical
product out there (can't thin of the name right now) that is supposed
to be faster, but FPDF is pretty fast in our applications.

I also use the JPGraph package for generating graphs
(http://www.aditus.nu/jpgraph/).  This is *really* slick.  Its free
for personal use, about $125 for commercial use.  You need to install
some additional PHP libraries (JPEG, PNG, GD at least), but its fast
and easy.  I love playing around with this product because the
possibilities for what you can do are almost endless.

HTH,
Steve 

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



Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread hanez
On Saturday 23 April 2005 20:27, M Saleh EG wrote:
 On 4/23/05, hanez [EMAIL PROTECTED] wrote:
  On Saturday 23 April 2005 19:33, Reynier Perez Mira wrote:
   Hi list:
  
   I have a problem with ASP .NET community in my Universty and I need to
   solve it. The thing is that they say me that ASP .NET is better than
  PHP,
 
   so I need information to response they about this theme. Can you put me
   some sites, statics, intrview to big personalities, articles to
   response
 
  My meaning about this:
 
  ASP .NET is not just a scripting language but more a plattform for
  Enterprise
  (web) applications. It really has many more features then PHP and i would
  compare ASP .NET more with JAVA/J2EE. I don't know much about ASP .NET
  since
  i am more familiar with PHP and maybe some little bit JAVA. I think it is
  better to compare with a scripting language like Python or Ruby. You
  could compare the old versions of ASP with PHP because this was nearly
  the same. I
  never have coded with ASP since i very rarely touch a windows box but it
  looked like VisualBasic code.
 
  Take a look here (Search Google: asp .net vs php5 ):
 
  http://www.oracle.com/technology/pub/articles/hull_asp.html
 
 I don't recommand this article at Oracle at all!!
 It's a very biased one and intends to misguide as a marketting gig. I'd
 like you to read healthy articles that truely compare. BTW
 ASP.nethttp://ASP.netcan not be compared with PHP5 because they are
 totaly different.
 It's like comparing Apples and Oranges. PHP can be compared to ASP not
 ASP.net http://ASP.net because it's totaly a different thing. HTH. Been
 there, done that.

Okay, please read my post again!

I would not compare PHP with ASP .NET. This is what i wrote. I found that link 
to Oracle within 5 seconds via Google and did not read the whole text but 
Reynier Perez Mira could understand the difference with it.

Please read carefully before reply and please don't top post!


Regards


Johannes Findeisen

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



Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread M Saleh EG
I did not say that you compared! Sorry if I put it that way. I said the 
article at Oracle does that.
In all the cases that article does not fairly illustrate anything. It's a 
merketing trick for novices!

On 4/23/05, hanez [EMAIL PROTECTED] wrote:
 
 On Saturday 23 April 2005 20:27, M Saleh EG wrote:
  On 4/23/05, hanez [EMAIL PROTECTED] wrote:
   On Saturday 23 April 2005 19:33, Reynier Perez Mira wrote:
Hi list:
   
I have a problem with ASP .NET community in my Universty and I need 
 to
solve it. The thing is that they say me that ASP .NET is better than
   PHP,
  
so I need information to response they about this theme. Can you put 
 me
some sites, statics, intrview to big personalities, articles to
response
  
   My meaning about this:
  
   ASP .NET is not just a scripting language but more a plattform for
   Enterprise
   (web) applications. It really has many more features then PHP and i 
 would
   compare ASP .NET more with JAVA/J2EE. I don't know much about ASP .NET
   since
   i am more familiar with PHP and maybe some little bit JAVA. I think it 
 is
   better to compare with a scripting language like Python or Ruby. You
   could compare the old versions of ASP with PHP because this was nearly
   the same. I
   never have coded with ASP since i very rarely touch a windows box but 
 it
   looked like VisualBasic code.
  
   Take a look here (Search Google: asp .net vs php5 ):
  
   http://www.oracle.com/technology/pub/articles/hull_asp.html
  
  I don't recommand this article at Oracle at all!!
  It's a very biased one and intends to misguide as a marketting gig. I'd
  like you to read healthy articles that truely compare. BTW
  ASP.net http://ASP.nethttp://ASP.netcan not be compared with PHP5 
 because they are
  totaly different.
  It's like comparing Apples and Oranges. PHP can be compared to ASP not
  ASP.net http://ASP.net http://ASP.net because it's totaly a 
 different thing. HTH. Been
  there, done that.
 
 Okay, please read my post again!
 
 I would not compare PHP with ASP .NET. This is what i wrote. I found that 
 link
 to Oracle within 5 seconds via Google and did not read the whole text but
 Reynier Perez Mira could understand the difference with it.
 
 Please read carefully before reply and please don't top post!
 
 
 Regards
 
 Johannes Findeisen
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread Johannes Findeisen
On Saturday 23 April 2005 20:57, M Saleh EG wrote:
 On 4/23/05, hanez [EMAIL PROTECTED] wrote:
  On Saturday 23 April 2005 20:27, M Saleh EG wrote:
   On 4/23/05, hanez [EMAIL PROTECTED] wrote:
On Saturday 23 April 2005 19:33, Reynier Perez Mira wrote:
 Hi list:

 I have a problem with ASP .NET community in my Universty and I need
 
  to
 
 solve it. The thing is that they say me that ASP .NET is better
 than
   
PHP,
   
 so I need information to response they about this theme. Can you
 put
 
  me
 
 some sites, statics, intrview to big personalities, articles to
 response
   
My meaning about this:
   
ASP .NET is not just a scripting language but more a plattform for
Enterprise
(web) applications. It really has many more features then PHP and i
 
  would
 
compare ASP .NET more with JAVA/J2EE. I don't know much about ASP
.NET since
i am more familiar with PHP and maybe some little bit JAVA. I think
it
 
  is
 
better to compare with a scripting language like Python or Ruby. You
could compare the old versions of ASP with PHP because this was
nearly the same. I
never have coded with ASP since i very rarely touch a windows box but
 
  it
 
looked like VisualBasic code.
   
Take a look here (Search Google: asp .net vs php5 ):
   
http://www.oracle.com/technology/pub/articles/hull_asp.html
  
   I don't recommand this article at Oracle at all!!
   It's a very biased one and intends to misguide as a marketting gig. I'd
   like you to read healthy articles that truely compare. BTW
   ASP.net http://ASP.nethttp://ASP.netcan not be compared with PHP5
 
  because they are
 
   totaly different.
   It's like comparing Apples and Oranges. PHP can be compared to ASP not
   ASP.net http://ASP.net http://ASP.net because it's totaly a
 
  different thing. HTH. Been
 
   there, done that.
 
  Okay, please read my post again!
 
  I would not compare PHP with ASP .NET. This is what i wrote. I found that
  link
  to Oracle within 5 seconds via Google and did not read the whole text but
  Reynier Perez Mira could understand the difference with it.
 I did not say that you compared! Sorry if I put it that way. I said the
 article at Oracle does that.
 In all the cases that article does not fairly illustrate anything. It's a
 merketing trick for novices!

Okay, but it defenitly says this:

snip from=http://www.oracle.com/technology/pub/articles/hull_asp.html
The latest incarnation of ASP, ASP.NET, is not completely backward-compatible 
with previous versions of ASP, as it is a complete rewrite of the software. 
Previous ASP technology actually has a lot more in common with PHP than with 
ASP.NET, which is a complete framework for building Web applications. One of 
the principal features of this model is the flexibility to choose your 
programming language. ASP.NET works with scripted languages such as VBScript, 
JScript, Perlscript, and Python, as well as compiled languages such as VB, 
C#, C, Cobol, Smalltalk, and Lisp. The new framework uses the common language 
runtime (CLR); your language source is compiled into Microsoft Intermediate 
Language code, which the CLR then executes.
/snip

This text says, that ASP .NET is a complete framework for building web 
applications.  All the other stuff maybe is some marketing strategy for 
selling Oracle software but i don't take care about that.

BTW, i think there is some more usefull information in this article (Anyway, i 
will not buy Oracle software).

Sorry for starting this flamewar. This was not my goal... ;-)

Regards

-- 
Johannes Findeisen

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



[PHP] radio buttons in $_POST

2005-04-23 Thread Ashley M. Kirchner
   I have this form.html:
form method=post action=form.php
text input input type=text name=input_testbr /
radio input1 input type=radio name=radio_test  value=test1 /
radio input2 input type=radio name=radio_test  value=test2 /
input type=submit value=Submit
/form
   Then I have this script (form.php):
?php
foreach ($_POST as $key = $val)
echo $key = $val\n;
?
   If I simply submit the form empty, all I get back from the script is 
the text input $key.  The radio button doesn't show up.  Why is that and 
how can I have it show up?  (the radio input does show up once one of 
the radios is checked, but I need it to show up when empty as well.)

--
H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging   . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 


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


Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Hegeds Balzs
Hi,
You solve the problem yourself: the radio input does show up once one 
of the radios is checked. When it is unchecked is isn't set...if you 
need to assign it a value in any circumstances you should test it with 
?php $chkbox1 = (isset($_POST[radio_test])) ? true : false; ? for 
example (of course you may omit the ternary operator...isset() will do 
the same).

Ashley M. Kirchner wrote:
   I have this form.html:
form method=post action=form.php
text input input type=text name=input_testbr /
radio input1 input type=radio name=radio_test  value=test1 /
radio input2 input type=radio name=radio_test  value=test2 /
input type=submit value=Submit
/form
   Then I have this script (form.php):
?php
foreach ($_POST as $key = $val)
echo $key = $val\n;
?
   If I simply submit the form empty, all I get back from the script 
is the text input $key.  The radio button doesn't show up.  Why is 
that and how can I have it show up?  (the radio input does show up 
once one of the radios is checked, but I need it to show up when empty 
as well.)

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


Re: [PHP] radio buttons in $_POST

2005-04-23 Thread M Saleh EG
That's because Radio Buttons and Check Boxes do not return anything if not 
checked or selected.
So you gotta explicitly do it ur self. That is u gotta check for it's 
validity and non-empiness.
e.g. in ur scenario
if(!isset($_POST['radio_test'])) { //print out all the options unselected } 
else
{ // print the value and show the rest empty in the report }

On 4/23/05, Ashley M. Kirchner [EMAIL PROTECTED] wrote:
 
 
 I have this form.html:
 
 form method=post action=form.php
 text input input type=text name=input_testbr /
 radio input1 input type=radio name=radio_test value=test1 /
 radio input2 input type=radio name=radio_test value=test2 /
 input type=submit value=Submit
 /form
 
 Then I have this script (form.php):
 
 ?php
 foreach ($_POST as $key = $val)
 echo $key = $val\n;
 ?
 
 If I simply submit the form empty, all I get back from the script is
 the text input $key. The radio button doesn't show up. Why is that and
 how can I have it show up? (the radio input does show up once one of
 the radios is checked, but I need it to show up when empty as well.)
 
 --
 H | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Imaging . 3550 Arapahoe Ave. #6
 http://www.pcraft.com . . . . Boulder, CO 80303, U.S.A.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Janet Valade
Ashley M. Kirchner wrote:
   I have this form.html:
form method=post action=form.php
text input input type=text name=input_testbr /
radio input1 input type=radio name=radio_test  value=test1 /
radio input2 input type=radio name=radio_test  value=test2 /
input type=submit value=Submit
/form
   Then I have this script (form.php):
?php
foreach ($_POST as $key = $val)
echo $key = $val\n;
?
   If I simply submit the form empty, all I get back from the script is 
the text input $key.  The radio button doesn't show up.  Why is that and 
how can I have it show up?  (the radio input does show up once one of 
the radios is checked, but I need it to show up when empty as well.)


One way would be to have a selection None and have it selected by 
default. As in,

None input type=radio checked name=radio_test  value=None /
Or you can just do something like,
 ?php
 if(!isset[$_POST['radio_test']))
echo radio_test = none\n;
 foreach ($_POST as $key = $val)
 echo $key = $val\n;
 ?
Janet

--
Janet Valade -- janet.valade.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Justin Gruenberg
 None input type=radio checked name=radio_test  value=None /

And if you didn't want it to show to the user (because they have to
make a choice anyway) . . . you can use this css:

input[value=None]
{
display: none;
}

You should then always have a value to play with in PHP, and the user
doesn't see any extra clutter.

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



[PHP] hosted 2 factor authentication services?

2005-04-23 Thread 1 2
Hi

I am using php and apache 2 on linux for a web
application.

Don't know if this is off topic but I don't know where
else to ask.

I am looking for some place relatively cheap that
could provide hosted authentication services along
with time based authenticater fobs like those found
from securID, verisign etc.

Ideally I would like to hook this into my current
login page with the hosted server returning a a yes/no
for a specific user.

Anyone know of a company that does this sort of thing?
I am in the UK and ideally would like to find
someplace nearby or with good links UK/Europe/N
America/India

Many thanks for any pointers.

Jack


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] hosted 2 factor authentication services?

2005-04-23 Thread M Saleh EG
www.dreamhost.com http://www.dreamhost.com is the best choice and the best 
value for money! Check it out.

On 4/23/05, 1 2 [EMAIL PROTECTED] wrote:
 
 Hi
 
 I am using php and apache 2 on linux for a web
 application.
 
 Don't know if this is off topic but I don't know where
 else to ask.
 
 I am looking for some place relatively cheap that
 could provide hosted authentication services along
 with time based authenticater fobs like those found
 from securID, verisign etc.
 
 Ideally I would like to hook this into my current
 login page with the hosted server returning a a yes/no
 for a specific user.
 
 Anyone know of a company that does this sort of thing?
 I am in the UK and ideally would like to find
 someplace nearby or with good links UK/Europe/N
 America/India
 
 Many thanks for any pointers.
 
 Jack
 
 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] radio buttons in $_POST

2005-04-23 Thread M. Sokolewicz
Justin Gruenberg wrote:
None input type=radio checked name=radio_test  value=None /

And if you didn't want it to show to the user (because they have to
make a choice anyway) . . . you can use this css:
input[value=None]
{
display: none;
}
You should then always have a value to play with in PHP, and the user
doesn't see any extra clutter.
which unfortunately currently only works in a couple of browsers 
(mozilla, (and thus firefox), and opera I think (?))

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


Re: [PHP] PHP vs ASP .NET

2005-04-23 Thread Greg Donald
On 4/23/05, Reynier Perez Mira [EMAIL PROTECTED] wrote:
 I have a problem with ASP .NET community in my Universty and I need to solve
 it. The thing is that they say me that ASP .NET is better than PHP, so I need
 information to response they about this theme. Can you put me some sites,
 statics, intrview to big personalities, articles to response ?

.NET is a framework, not a language.  Many other languages qualify as
.NET languages besides just C# and VB.net.  So if you don't like the
Microsoft ones you can try others:

http://php-sharp.sourceforge.net/
http://www.startvbdotnet.com/dotnet/languages.aspx


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

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



Re: [PHP] Zend Certification Exam

2005-04-23 Thread Greg Donald
On 4/23/05, M Saleh EG [EMAIL PROTECTED] wrote:
 Anyone who passesd?

If I can pass..  well, good luck!  :)


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

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



Re: [PHP] Tesing Gzip files

2005-04-23 Thread The Disguised Jedi
I'd generate an MD5 sum on a file you know is valid, and compare it against 
that in your script.

On 4/23/05, Prathaban Mookiah [EMAIL PROTECTED] wrote:
 
 Hello,
 
 Is there a way to test if a .gz file is in a valid format. Functions like
 gzread, gzfile don't seem to care if the file is corrupt or not.
 
 gzeof also didn't work for me. I guess it is because it does not check for 
 a
 valid .gz termination. Any ideas to go about doing this?
 
 Thanks in advance.
 
 Cheers,
 
 Prathap
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm 
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However, 
I must say that the ENTIRE contents of this message are subject to other's 
criticism, corrections, and speculations.

This message is Certified Virus Free


[PHP] help for me about session

2005-04-23 Thread Josephson Tracy



hi everyone,
when i study php, i have a problem as following:
-
file1.php 






 


-
but when the 2ed access the file1.php
the value of $NextCourse is the $NextCourse in the , Not the value of document.form1.NextCourse.value.

could someone tell me why?thanksÉÁµçÓʼþ£¬¿ìËÙÎȶ¨£¬°²È«¿É¿¿£¡£¡ÓÐÎÒΪÄ㵲סÀ¬»øÓʼþ£¡


Re: [PHP] help for me about session

2005-04-23 Thread Steve Buehler
At 09:35 PM 4/23/2005, Josephson Tracy wrote:

hi everyone,
when i study php, i have a problem as following:
-
file1.php
?
if($NextCourse == 1){ do something;}
else($NextCourse ==){do something other }
?
-
but when the 2ed access the file1.php
the value of $NextCourse is the $NextCourse in the ? and ?, Not the 
value of document.form1.NextCourse.value.

could someone tell me why?thanks
I believe it should be:
?
if($NextCourse == 1){ do something; }
elseif(!$NextCourse){ do something other; }
?
By the way you have your statement, I think you are only looking for the 
1.  You might try the following instead.
?
if($NextCourse == 1){
do something;
}else{
do something else;
}
?

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


Re: [PHP] help for me about session

2005-04-23 Thread Pedro Luis Cruz Riguetti

-- mierda carajo saquenme de sta lista de mierda q llema mi correo de huevadas
rapido carjo.nierdas






---
Banco de Crédito BCP - Dedicados a hacerte la Banca más simple.
Visita nuestra Banca por Internet http://www.viabcp.com
---

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



[PHP] Re:Re: [PHP] help for me about session

2005-04-23 Thread Josephson Tracy



-  Original Message  -
From: Steve Buehler 
To: Josephson Tracy ;php-mailing-lists 
Subject: Re: [PHP] help for me about session
Sent: Sun Apr 24 10:54:34 CST 2005

> At 09:35 PM 4/23/2005, Josephson Tracy wrote:
> 
> 
> >hi everyone,
> >when i study php, i have a problem as following:
> >-
> >file1.php
> > >if($NextCourse == 1){ do something;}
> >else($NextCourse ==""){do something other }
> >?>
> >-
> >but when the 2ed access the file1.php
> >the value of $NextCourse is the $NextCourse in the , Not the 
> >value of document.form1.NextCourse.value.
> >
> >could someone tell me why?thanks
> 
> I believe it should be:
>  if($NextCourse == 1){ do something; }
> elseif(!$NextCourse){ do something other; }
>  
> By the way you have your statement, I think you are only looking for the 
> "1".  You might try the following instead.
>  if($NextCourse == 1){
>  do something;
> }else{
>  do something else;
> }
> ?>
> 
ok. the key problem is when I click the button to submit. 
the value of $NextCourse is not  the value of value
 of document.form1.NextCourse.value.
just is the pre page's $NextCourse,that's say "null";
how can i get document.form1.NextCourse.value


Re: [PHP] Dynamic Generating reports to print

2005-04-23 Thread Dan Rossi
On 24/04/2005, at 12:43 AM, Steve Brown wrote:

I used to encounter the same problems with reporting in our business
software.  You can generate reports and spit out HTML in a new window
and have the user print the report from the browser, but that has many
drawbacks.  It only works with simple data sets, its difficult (or
impossible) to control page breaks, lack of precision placing, etc.
Now I use FPDF to generate PDF reports (http://www.fpdf.org/).  Its
free, easy to use, and pretty flexible.  It allows you to do precision
placement on a page, add headers, footers, etc, etc, etc.  Be sure to
check out the Scripts section, its got a bunch of useful tips for
expanding functionality of the classes.  There is another commerical
product out there (can't thin of the name right now) that is supposed
to be faster, but FPDF is pretty fast in our applications.

I find doing it this way a total pain in the ass, I have in the past 
used htmldoc , to generate html to pdf , it has special tags to do 
certain things in the pdf's. Seriously drawing it like this is time 
consuming. I would suggest report designers like report manager and 
jasper reports. Currently for Excel I have built a subclass to the PEAr 
structures datagrid which uses the excel spreadsheet renderer, and i 
give it a database resultset, currently the dataobject, and then it 
will generate the columns dynamically from the query. I have given it 
extra methods to display extra stuff in the header and footer ie for 
formulas , and special formatting on the cells. But pdf's are nice if 
the user doesnt need to collate the data just print it.

The funky thing with Jasper reports is, you can maniuplate the xml 
based files, say build a web frontend to build a report builder, so the 
user doesnt need to use gui tools like iReport to create report 
templates. So you let them select the fields you want, and u do the sql 
and xml generating in the backend. To do it currently, the fields have 
to be statically setup , it also however requires a Jsp to run a 
servlet to compile the reports. Reportman however runs a cgi report 
server, but cant do excel on unix.

I also use the JPGraph package for generating graphs
(http://www.aditus.nu/jpgraph/).  This is *really* slick.  Its free
for personal use, about $125 for commercial use.  You need to install
some additional PHP libraries (JPEG, PNG, GD at least), but its fast
and easy.  I love playing around with this product because the
possibilities for what you can do are almost endless.

This is really sweet however it doesnt have PHP5 support ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] reverse MD5 ???

2005-04-23 Thread D. Wokan
William Stokes wrote:
Hello,
I have a system that uses certain id info. This info is stored in a session 
cookie in MD5 format. At certain parts of the code I need to update or 
insert to MySQL DB with that id info value in cleartext. Is this possible?

If so, how to put this to a sql query?
$sqlquery = insert into x_table (team_id,number,) values 
('$team_id','$number')

$team_id is the MD5 formatted cookie value and I need to put it to the 
x_table column team_id in cleartext.

Thanks a lot
-Will
 

MD5 values are hashes, not encryptions.  There's nothing to decrypt.  
It's good for storing the results of some value and than when the person 
sends the MD5 back at a later point you can make sure it still matches 
the desired value by re-hashing the original value again.

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


Re: [PHP] MSSqlServer table/field information

2005-04-23 Thread D. Wokan
Chris Boget wrote:
Is there a way to programatically get information about a 
specific table and/or field?  And also any constraints that 
a field has?

thnx,
Chris
 

sp_help @objname='{tablename}'
This will actually return several recordsets which are probably 
available individually in the other responses I've seen to this 
message.  I just wanted to make the list of options more complete.

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


Re: [PHP] image maps in PHP

2005-04-23 Thread Dasmeet Singh
John Coppens wrote:
On Fri, 22 Apr 2005 19:11:23 +0530
[EMAIL PROTECTED] (Dasmeet Singh) wrote:

Actually I am not able to make image maps because of uneven state 
boundaries..

Can you please suggest some tools... I haven't used any yet...

Did you check GIMP? It has an option to make HTML image maps. 
Check Filters|Web|ImageMap

John

Thanks
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
Mike wrote:
Hi!
I need to create an image map on a country map, where people 
can click on any state and get some info related to it.. In 
such case the regular polygon/circle/rectengle image map wont 
do bcoz of shapes of state..

I guess this must be possible someway in PHP.. please tell me 
if you have any idea how to go abt this..

Is the problem you're experiencing that the image map isn't being
built properly or are you passing information to it that does not
appear to be consistant.
If it's the former, then PHP has nothing to do with that. I'm sure
you can find some tools to generate image maps for you. There have
always been free ones with a minimum of effort. 

If you're having problem with PHP in the mix, can you describe the PHP
problem, provide some code, some sample output, etc.? 

I've used image maps in the past (though I try to stay away from
them) and you can create a link with virtually any polygon if you
have the patience to may out the plot points. You could easily create
a star with many, many points and have it be clickable - which would
indicate that most states would be a piece of cake. 

-M
Thanks John,
I never knew about any such thing in Gimp :)
SayOrange.com
How to choose the best web hosting?
http://www.sayorange.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php