RE: [PHP] help me plz

2006-01-20 Thread Thomas
Hey Suresh, You could use AJAX to populate your dropwdown boxes without reloading your browser. I used something like that in a project just now. Essentially, you will call a php script that would select your second box's data according to the value of the first. You can also do this with

[PHP] Re: reading variables?

2006-01-20 Thread David Dorward
William Stokes wrote: For each printed document there's a check box Delete for marking that document for deletion. The document info from DB is printed using 'while' loop. The only problem I have is that I don't know how to handle/read the Delete checkbox values because the checkbox name is

Re: [PHP] Determining number of days in a selected month

2006-01-20 Thread Jesús Fernández
You could also use the well known date() function to do that. Here's the doc http://www.php.net/manual/en/function.date.php Look for the format character t, it wil give you the number of days of the month you give it as timestamp. -- Esú - http://esu.proyectoanonimo.com

[PHP] Creating protected Excel files from PHP

2006-01-20 Thread Karl-Heinz Christian Zeck
Hi, I would like to know if any from you guys have a solution to my problem. I use PHP and a PEAR class (PEAR::Spreadsheet_Excel_Writer) to generate some reports as Excel files. My problem is that I want these files to be protected with a password (because these reports will be downloaded to the

Re: [PHP] php5.0.5 include() terminates script BUGBUGBUGBUG

2006-01-20 Thread Jochem Maas
please don't mail me off list. [EMAIL PROTECTED] wrote: thanx jochem maas mmm... it is still a mystery i wrote a piece of debugging code to see if the file is readable or accessable via php... //$yourInclude = include(phpinfo.php); $yourInclude = 'phpinfo.php'; if

[PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
Hi All, Wondering if anyone can help me work out why date(H) always adds an hour? I'm *assuming* it thinks it should be compensating for Daylight Saving Time (though I'd be just as willing to believe that it's caused by something else), however we don't observe DST in Queensland, Australia.

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, What do you get if you print date(T)? David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
On 20/01/2006 8:39 PM, David Grant wrote: Murray, What do you get if you print date(T)? David Hi David, I get EST, which I assume is Eastern Savings Time? If that's the case, any idea where I change this value so that it only affects my local machine? Much warmth, Murray -- PHP

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, As far as I know, Queensland is in EST (Eastern Standard Time), so that is the correct value. Are you using the same machine or is it remote? David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Murray @ PlanetThoughtful
On 20/01/2006 8:48 PM, David Grant wrote: Murray, As far as I know, Queensland is in EST (Eastern Standard Time), so that is the correct value. Are you using the same machine or is it remote? David Hi David, I'm currently working entirely on my local (Queensland) machine. The remote

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread David Grant
Murray, I can't think what else it might be. Sorry! David -- David Grant http://www.grant.org.uk/ http://pear.php.net/package/File_Ogg0.2.1 http://pear.php.net/package/File_XSPF 0.1.0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Silvio Porcellana [tradeOver]
David Grant wrote: Murray, I can't think what else it might be. Sorry! David What does date(I, $datevalue) return? (it's a capital 'i') I guess you already checked out this page... http://php.net/date -- tradeOver | http://www.tradeover.net ...ready to become the King of the World? --

Re: [PHP] URL - stream context

2006-01-20 Thread Jochem Maas
I think you need to create a stream context resource with: http://www.php.net/manual/en/function.stream-context-create.php set the options you need on it with: http://www.php.net/manual/en/function.stream-context-set-option.php then pass the resource as the 4th arg to fopen() (rather passing

[PHP] fsockopen, openssl error

2006-01-20 Thread James Benson
Im running into the followng error when trying to use fsockopen with the openssl extension, Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: failed to create an SSL context Warning: fsockopen(): failed to activate SSL mode 1 Socket Error: Operation now in progress

RE: [PHP] Embedded Player

2006-01-20 Thread ET Support
You may also want to consider using frames, I've found that method to work well when I want music to play continuously while a visitor surfs through the site and it won't get stopped by popup blockers. As for reducing file size, I found a program called CDex v1.51 to be very effective... you can

[PHP] ftp_get, ftp_put problem

2006-01-20 Thread Antonis Varkas
Hi, I am writing a php script to upload/download a file onto/from an FTP Server. I manage to connect to the server, login correctly, change directory, list all the files there but fail to get or put the file. The documentation says that ftp_get and ftp_put return TRUE or FALSE. In my case

[PHP] Re: fsockopen, openssl error

2006-01-20 Thread Barry
James Benson wrote: Im running into the followng error when trying to use fsockopen with the openssl extension, Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: failed to create an SSL context Warning: fsockopen(): failed to activate SSL mode 1 Socket Error: Operation now

Re: [PHP] php5.0.5 include() terminates script BUGBUGBUGBUG

2006-01-20 Thread David Hall
Jochem Maas wrote: the first and second line you can alter it or just switch between pending if you want it to display the file or just to tell you if it exists or not so...applying this code just before my include statments all verifys ok(thats the file exists) if i use line 1

RE: [PHP] odd behavior SOLVED - MORE IMPORTANT

2006-01-20 Thread Jay Blanchard
[snip] From the offices of You Ain't Gonna' Beleeeve Dis, Inc. We barked up several trees, but there were no real squirrels. PHP 4.4.1, the version on the server in question, comes with 2 flavors of ini file, the dist and the recommended. I had copied the recommended and renamed it php.ini,

RE: [PHP] New to PHP

2006-01-20 Thread Jay Blanchard
[snip] I use Xampp because I'm new to all of this also, and it makes setup a breeze. http://www.apachefriends.org/en/ This installs Apache, mysql, php, pearl, ftpzilla, all kinds of stuff, already configured and ready to rock. It doesn't get any easier. [/snip] Here is another one that works

RE: [PHP] ftp_get, ftp_put problem

2006-01-20 Thread Jay Blanchard
[snip] I am writing a php script to upload/download a file onto/from an FTP Server. I manage to connect to the server, login correctly, change directory, list all the files there but fail to get or put the file. The documentation says that ftp_get and ftp_put return TRUE or FALSE. In my case

Re: [PHP] ftp_get, ftp_put problem

2006-01-20 Thread Richard Davey
On 20 Jan 2006, at 13:26, Antonis Varkas wrote: I am writing a php script to upload/download a file onto/from an FTP Server. I manage to connect to the server, login correctly, change directory, list all the files there but fail to get or put the file. The documentation says that ftp_get

[PHP] New identification after an error...

2006-01-20 Thread David BERCOT
Hi, I use this program to force a user to authenticate : if (!isset($_SERVER[PHP_AUTH_USER])) { header(WWW-Authenticate: Basic realm=\Intranet SDSED\); header(HTTP/1.1 401 Unauthorized); } Everything is ok except a detail : if the user makes a mistake (for example, a bad

RE: [PHP] New identification after an error...

2006-01-20 Thread Albert
David BERCOT wrote: I use this program to force a user to authenticate : if (!isset($_SERVER[PHP_AUTH_USER])) { header(WWW-Authenticate: Basic realm=\Intranet SDSED\); header(HTTP/1.1 401 Unauthorized); } Everything is ok except a detail : if the user makes a mistake (for

Re: [PHP] php5.0.5 include() terminates script BUGBUGBUGBUG

2006-01-20 Thread Jochem Maas
David Hall wrote: Jochem Maas wrote: the first and second line you can alter it or just switch between pending if you want it to display the file or just to tell you if it exists or not so...applying this code just before my include statments all verifys ok(thats the file exists)

Re: [PHP] New identification after an error...

2006-01-20 Thread David Grant
David David BERCOT wrote: I've tried : $_SERVER[PHP_AUTH_USER] = NULL; without succes... http://www.php.net/unset e.g. unset($_SERVER['PHP_AUTH_USER']); It might, however, be better practice to used an authorisation state variable, or something similar, i.e. if (! $auth) { // HTTP

Re: [PHP] New identification after an error...

2006-01-20 Thread Jochem Maas
David BERCOT wrote: Hi, I use this program to force a user to authenticate : if (!isset($_SERVER[PHP_AUTH_USER])) { header(WWW-Authenticate: Basic realm=\Intranet SDSED\); header(HTTP/1.1 401 Unauthorized); } Everything is ok except a detail : if the user makes a mistake (for

Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Davey
On 20 Jan 2006, at 14:24, David BERCOT wrote: I use this program to force a user to authenticate : if (!isset($_SERVER[PHP_AUTH_USER])) { header(WWW-Authenticate: Basic realm=\Intranet SDSED\); header(HTTP/1.1 401 Unauthorized); } Everything is ok except a detail : if the user

[PHP] problem encountered with stristr-based function

2006-01-20 Thread George Pitcher
Hi, I'm having a problem with the following function: function terms($term,$field){ if(strlen($term)0){ if(!stristr($term, $field) === FALSE) { $output = str_replace($term, b.$term./b, $field); } elseif(!stristr(strtolower($term), $field) === FALSE) { $output =

Re: [PHP] problem encountered with stristr-based function

2006-01-20 Thread David Grant
George, George Pitcher wrote: For info, I am trying to highlight search terms in results. If you're searching and replacing within HTML, you ought to be aware of issues if someone's search term happens to be an HTML tag or attribute. For example, Alice might search for href and get the

[PHP] Re: fsockopen, openssl error

2006-01-20 Thread James Benson
Seems like he can't start TLS.´ Have you tried a newer version of PHP than 4.4.2? If so, i would like to know what happened. Barry Just compiled 5.1.2 and 4.4.1, it happended again with 4.4.1 but not with 5.1.2, I dont have time to try 4.4.0 but will do later. One thing i forgot to

Re: [PHP] Determining number of days in a selected month

2006-01-20 Thread tedd
Is there a way to easily tell PHP how many days there are in a selected month without writing the following out for each month: if($Month == January) { $NumberOfDays = 31; } elseif($Month == February) { if($Year == A Leap Year) { $NumberOfDays = 29; }

[PHP] Re: fsockopen, openssl error

2006-01-20 Thread Barry
James Benson wrote: Seems like he can't start TLS.´ Have you tried a newer version of PHP than 4.4.2? If so, i would like to know what happened. Barry Just compiled 5.1.2 and 4.4.1, it happended again with 4.4.1 but not with 5.1.2, I dont have time to try 4.4.0 but will do later.

RE: [PHP] problem encountered with stristr-based function

2006-01-20 Thread George Pitcher
David, No html involved. Just db results. I've found that eregi_replace() does the job adequately, if not perfectly. Us typesetters are hard to please when it comes to string handling. Cheers George -Original Message- From: David Grant [mailto:[EMAIL PROTECTED] Sent: 20 January

Re: [PHP] Email Form

2006-01-20 Thread sunaram patir
i have en experience of getting blocked by yahoo when i didn't use the extra headers On 1/20/06, Weber Sites LTD [EMAIL PROTECTED] wrote: Hi Richard, I'm trying to understand why this is good from a SPAM point of view. I'm guessing that anyone can just add this when sending his own spam no?

[PHP] mod_php environment

2006-01-20 Thread ms419
How do I configure which variables are passed to mod_php's environment? I'm working on a project using Jon Praise' superb PHP SASL bindings - http://cgi.sfu.ca/~jdbates/moin/moin.cgi/SquirrelMailSASL Using GSSAPI authentication requires a KRB5CCNAME environment variable be passed from

Re: [PHP] New identification after an error...

2006-01-20 Thread David BERCOT
David BERCOT wrote: I've tried : $_SERVER[PHP_AUTH_USER] = NULL; without succes... http://www.php.net/unset e.g. unset($_SERVER['PHP_AUTH_USER']); It might, however, be better practice to used an authorisation state variable, or something similar, i.e. if (! $auth) { //

[PHP] adding script

2006-01-20 Thread Ross
This was a page I did ages ago http://www.ecurry.net/menu2.php The problem with it is when you add or subtact an item is it always button press behind. This must be because of the way the page self submits or something? The script is here http://www.ecurry.net/calculate.phps This

RE: [PHP] Email Form

2006-01-20 Thread Weber Sites LTD
Hi Richard, I'm trying to understand why this is good from a SPAM point of view. I'm guessing that anyone can just add this when sending his own spam no? berber -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 11:37 PM To: Weber Sites

Re: [PHP] adding script

2006-01-20 Thread Silvio Porcellana [tradeOver]
Ross wrote: This was a page I did ages ago http://www.ecurry.net/menu2.php The problem with it is when you add or subtact an item is it always button press behind. This must be because of the way the page self submits or something? The script is here

Re: [PHP] Determining number of days in a selected month

2006-01-20 Thread tg-php
date(t) will give you the number of days in the current month. Or you can do: date(t, mktime(0, 0, 0, $month, $day, $year)) to get the number of days in a specific month in a specific year (that way you can get leap year accurate counts..) -TG = = = Original message = = = Is there a way to

[PHP] simple DOM/XML test fails in php

2006-01-20 Thread Larry Hughes
I have a very simple DOM test set up which is failing. Environment is apacie 1.3.x, WIN xp, PHP 5.1.2 ; DOM seetings outlined in phpinfo() indicate various DOM/XML support is enabled. Failing php is: ?php $dom = new DOMDocument('1.0', 'iso-8859-1'); echo $dom-saveXML(); ? which results in:

[PHP] simple DOM/XML test fails in php

2006-01-20 Thread Larry Hughes
I have a very simple DOM test set up which is failing. Environment is apacie 1.3.x, WIN xp, PHP 5.1.2 ; DOM seetings outlined in phpinfo() indicate various DOM/XML support is enabled. Failing php is: ?php $dom = new DOMDocument('1.0', 'iso-8859-1'); echo $dom-saveXML(); ? which results in: The

[PHP] Managing sessions...

2006-01-20 Thread David BERCOT
Hi again, Ok, it's probably not the first time you have a question about sessions with PHP ;-) I've tried to read mails, documentation, searching on Internet but, finally, I think everything is not clear !!! First of all, I understand that, if session.auto_start is not on '1', I have to write

[PHP] Re: Managing sessions...

2006-01-20 Thread Barry
David BERCOT wrote: Hi again, Ok, it's probably not the first time you have a question about sessions with PHP ;-) I've tried to read mails, documentation, searching on Internet but, finally, I think everything is not clear !!! First of all, I understand that, if session.auto_start is not on

[PHP] Count of elements in XML

2006-01-20 Thread Jay Paulson
I was wondering if there is a way to get the number of foo elements in my XML below? This way I could loop through each element and print out the attributes. $string = a foo name=\one\ game=\lonely\1/foo foo name=\two\ game=\again\2/foo foo name=\three\ game=\blah\3/foo foo name=\four\

RE: [PHP] Count of elements in XML

2006-01-20 Thread Richard Correia
Hi Jay, Check the example at http://www.weberdev.com/Manuals/PHP/function.simplexml-element-children.html Thanks, Richard -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 11:06 PM To: PHP LIST Subject: [PHP] Count of elements in XML I was

[PHP] getting list of files included

2006-01-20 Thread Diana Castillo
does anyone know of a command in php that will give you a list of the files already included . Something that would tell you whether a file is already included before you do the require_once ? -- Diana Castillo Destinia.com C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039

RE: [PHP] getting list of files included

2006-01-20 Thread Jay Blanchard
[snip] does anyone know of a command in php that will give you a list of the files already included . Something that would tell you whether a file is already included before you do the require_once ? [/snip] There is not a command or function built in, but http://www.php.net/include has a

Re: [PHP] getting list of files included

2006-01-20 Thread Silvio Porcellana [tradeOver]
Diana Castillo wrote: does anyone know of a command in php that will give you a list of the files already included . Something that would tell you whether a file is already included before you do the require_once ? Try this: http://php.net/manual/en/function.get-included-files.php Oh,

RE: [PHP] getting list of files included

2006-01-20 Thread Richard Correia
Check the example at http://www.weberdev.com/Manuals/PHP/function.get-included-files.html Thanks, Richard -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 11:55 PM To: php-general@lists.php.net Subject: [PHP] getting list of files

Re: [PHP] getting list of files included

2006-01-20 Thread John Nichel
Diana Castillo wrote: does anyone know of a command in php that will give you a list of the files already included . Something that would tell you whether a file is already included before you do the require_once ? If you're using include|require_once, why worry if it's already been

[PHP] Re: Managing sessions...

2006-01-20 Thread David Hall
David BERCOT wrote: I think it is very heavy to write... I read about ini_set(session.auto_start,1) but, on my server (Debian), it doesn't session.auto_start doesn't make sense as being set in the actual file. its meant to be something that's done by the server on every file, so setting

Re: [PHP] Managing sessions...

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 10:53 am, David BERCOT wrote: Isn't there, like in asp, a global.asa where I can put all my parameters ? You could solve this with: php.ini .htaccess include (or require) auto_prepend_file The problem with global.asa is that it implies a shared memory space that PHP

Re: [PHP] simple DOM/XML test fails in php

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 10:20 am, Larry Hughes wrote: I have a very simple DOM test set up which is failing. Environment is apacie 1.3.x, WIN xp, PHP 5.1.2 ; DOM seetings outlined in phpinfo() indicate various DOM/XML support is enabled. Failing php is: ?php $dom = new DOMDocument('1.0',

Re: [PHP] mod_php environment

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 9:30 am, [EMAIL PROTECTED] wrote: How do I configure which variables are passed to mod_php's environment? I'm working on a project using Jon Praise' superb PHP SASL bindings - http://cgi.sfu.ca/~jdbates/moin/moin.cgi/SquirrelMailSASL Using GSSAPI authentication

Re: [PHP] problem encountered with stristr-based function

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 8:44 am, George Pitcher wrote: function terms($term,$field){ if(strlen($term)0){ if(!stristr($term, $field) === FALSE) { This is quite contorted... And you have the arguments swapped, which is the real problem. if(stristr($field, $term)){ $output =

[PHP] Get text from funky url?

2006-01-20 Thread lists
Hello, I am trying to get xml from AIM's new presence API. The url is unusual, it has quotes in it. Anyone know a way to get the text from this? http://api.oscar.aol.com/SOA/key=PandorasBoxGoodUntilJan2006/resource-lists/ users/*anonymous*/presence/~~/resource-lists/list[name=\users\]/[EMAIL

Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 8:24 am, David BERCOT wrote: I use this program to force a user to authenticate : if (!isset($_SERVER[PHP_AUTH_USER])) { header(WWW-Authenticate: Basic realm=\Intranet SDSED\); header(HTTP/1.1 401 Unauthorized); } Everything is ok except a detail : if

Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 9:32 am, David BERCOT wrote: David BERCOT wrote: I've tried : $_SERVER[PHP_AUTH_USER] = NULL; without succes... http://www.php.net/unset e.g. unset($_SERVER['PHP_AUTH_USER']); It might, however, be better practice to used an authorisation state variable, or

Re: [PHP] Get text from funky url?

2006-01-20 Thread Philip Hallstrom
I am trying to get xml from AIM's new presence API. The url is unusual, it has quotes in it. Anyone know a way to get the text from this? http://api.oscar.aol.com/SOA/key=PandorasBoxGoodUntilJan2006/resource-lists/ users/*anonymous*/presence/~~/resource-lists/list[name=\users\]/[EMAIL

Re: [PHP] fsockopen, openssl error

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 7:38 am, James Benson wrote: Im running into the followng error when trying to use fsockopen with the openssl extension, Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: failed to create an SSL context Warning: fsockopen(): failed to activate SSL

Re: [PHP] Get text from funky url?

2006-01-20 Thread lists
on 1/20/06 4:37 PM, Philip Hallstrom at [EMAIL PROTECTED] wrote: I am trying to get xml from AIM's new presence API. The url is unusual, it has quotes in it. Anyone know a way to get the text from this? http://api.oscar.aol.com/SOA/key=PandorasBoxGoodUntilJan2006/resource-lists/

Re: [PHP] ftp_get, ftp_put problem

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 7:26 am, Antonis Varkas wrote: I am writing a php script to upload/download a file onto/from an FTP Server. I manage to connect to the server, login correctly, change directory, list all the files there but fail to get or put the file. The documentation says that

Re: [PHP] Get text from funky url?

2006-01-20 Thread Marco Kaiser
Hi, try to use urlencode() and urldecode() to encode url's. -- Marco 2006/1/20, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hello, I am trying to get xml from AIM's new presence API. The url is unusual, it has quotes in it. Anyone know a way to get the text from this?

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 4:24 am, Murray @ PlanetThoughtful wrote: Wondering if anyone can help me work out why date(H) always adds an hour? I'm *assuming* it thinks it should be compensating for Daylight Saving Time (though I'd be just as willing to believe that it's caused by something

RE: [PHP] Email Form

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 9:02 am, Weber Sites LTD wrote: I'm trying to understand why this is good from a SPAM point of view. I'm guessing that anyone can just add this when sending his own spam no? Hey, I'm not claiming that the spam criteria are rational, nor that any halfway intelligent

Re: [PHP] URL - stream context

2006-01-20 Thread Richard Lynch
On Thu, January 19, 2006 6:49 pm, Geoff wrote: Richard, have you seen this: http://bugs.php.net/bug.php?id=5153edit=1 This bug goes back to June 2000. And it's closed even though it is clearly not fixed. Doesn't seem like they'll get to it anytime soon. You might have to do it the long way,

[PHP] Upgrade to 4.4.2 shows as 4.4.1-pl-1 (Windows)

2006-01-20 Thread Chuck Anderson
I upgraded to 4.4.2, the Windows binary. When I run phpinfo, the title says PHP Version 4.4.1-pl1 (my previous version). However, under apache2handler, though, it says: Apache/2.0.55 (Win32) mod_ssl/2.0.55 OpenSSL/0.9.8a PHP/4.4.2 (I run php as an Apache module on my home PC.) Is there

[PHP] Str to Int

2006-01-20 Thread Ron Eggler (Paykiosks)
Hi, I need to do a type cast from string to int in folllowing code: [php] getPIN cardID='.intval(trim($cardID)).' quantity=1 / [/php] I need $cardID have converted to int. I thought it should work that way but it does not! But it's working if I'm putting [php] getPIN cardID=180 quantity=1 /

Re: [PHP] URL - stream context

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 7:10 am, Jochem Maas wrote: I think you need to create a stream context resource with: http://www.php.net/manual/en/function.stream-context-create.php set the options you need on it with: http://www.php.net/manual/en/function.stream-context-set-option.php then pass

Re: [PHP] Str to Int

2006-01-20 Thread Ray Hauge
You should be able to typecast the variable like so: $cardID = (int)$cardID; You can also check which type it is showing up as with the function gettype(): http://www.php.net/manual/en/function.gettype.php Optionally you could use settype() to change the type of the variable:

Re: [PHP] Str to Int

2006-01-20 Thread Gerry Danen
You probably want to do an is_int() first... After that, you know it's an int and treat it that way. Why do you need to typecast it? BTW, change $cardID = $HTTP_GET_VARS[cardID]; to $cardID = $_GET['cardID']; for PHP5 compatibility... ;-) Gerry On 1/20/06, Ron Eggler (Paykiosks) [EMAIL

Re: [PHP] Str to Int

2006-01-20 Thread Ron Eggler (Paykiosks)
Am Freitag, den 20.01.2006, 16:08 -0700 schrieb Gerry Danen: You probably want to do an is_int() first... After that, you know it's an int and treat it that way. Why do you need to typecast it? BTW, change $cardID = $HTTP_GET_VARS[cardID]; to $cardID = $_GET['cardID']; for PHP5

Re: [PHP] Str to Int

2006-01-20 Thread comex
if ($cardID=''||is_int($cardID)) Two problems with that statement: First of all, this statement _sets_ cardID to '', and then (I think) returns a false value since '' doesn't evaluate to true. You probably wanted ==. Second of all, now that $cardID is '', it certainly isn't an int. It isn't an

Re: [PHP] Str to Int

2006-01-20 Thread adriano ghezzi
well I don't well understand the problem hope these two snippets can solve your problem: i tested them seems fine file 1 form.php html head meta http-equiv=Content-Language content=it meta http-equiv=Content-Type content=text/html; charset=windows-1252 titleenter tour code/title /head body

Re: [PHP] Str to Int

2006-01-20 Thread Ron Eggler (Paykiosks)
Am Freitag, den 20.01.2006, 18:28 -0500 schrieb comex: if ($cardID=''||is_int($cardID)) Two problems with that statement: First of all, this statement _sets_ cardID to '', and then (I think) returns a false value since '' doesn't evaluate to true. You probably wanted ==.

Re: [PHP] Str to Int

2006-01-20 Thread tg-php
Ok, some good points where made already, but let's pull it all together: 1. You should get in the habit of using $_GET[] instead of $HTTP_GET_VARS.. minor thing but worth noting (info at http://us2.php.net/reserved.variables) 2. case reserve: This, I believe, will treate reserve as a

[PHP] difference between require and include

2006-01-20 Thread balachandar muruganantham
Can anyone tell me the exact differeneces between require and include? -- name balachandar muruganantham/name Yahoo! mbchandar/Yahoo! Hotmail mbchandar/Hotmail blog http://chandar.blogspot.com/blog webhttp://www.balachandar.net/web talk http://www.expertstalk.org/talk

[PHP] PHP 4.4.2 Update Issues?

2006-01-20 Thread [EMAIL PROTECTED]
Hello I've started work for a client who has their own server running PHP 4.1.1. If I upgrade them to PHP 4.4.2, will there be any issues I'd need to look out for? Is there a general process (or checklist) I should follow when upgrading PHP versions to find where potential the may be

Re: [PHP] date(H, $datevalue) always adds an hour?

2006-01-20 Thread Michael Hulse
Hi, On Jan 20, 2006, at 2:24 AM, Murray @ PlanetThoughtful wrote: Can anyone help me figure out how to accommodate for this? Not sure if this will help, but: # Set time zone: putenv('TZ=US/Pacific'); // I am on west-coast, my servers are on east, if not for this code the timestamp used in

Re: [PHP] Determining number of days in a selected month

2006-01-20 Thread Jeffrey Pearson
The java mailing list I belong to recently had this same conversation. I didn't know php had that ability built in. Java doesn't (score another one for php). The cleanest solution I saw on the Java list that would be non-language specific (in other words, the same logic can be implemented

Re: [PHP] difference between require and include

2006-01-20 Thread Adi
http://ca.php.net/manual/en/function.include.php On 1/20/06, balachandar muruganantham [EMAIL PROTECTED] wrote: Can anyone tell me the exact differeneces between require and include? -- name balachandar muruganantham/name Yahoo! mbchandar/Yahoo! Hotmail mbchandar/Hotmail blog

RE: [PHP] difference between require and include

2006-01-20 Thread Weber Sites LTD
Check out some info here : http://www.weberdev.com/ViewArticle/440 Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP Web Logs : http://www.weberblog.com/ PHP MySQL Forums :

RE: [PHP] Email Form

2006-01-20 Thread Weber Sites LTD
Lucky for me I have my own server :) Thanks for the info, I will try it and report if I see any difference. Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP Web Logs : http://www.weberblogs.com/ PHP

RE: [PHP] Managing sessions...

2006-01-20 Thread Weber Sites LTD
Maybe this class can help make things simpler : A beginner's session handling class http://www.weberdev.com/get_example-4175.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. PHP code examples : http://www.weberdev.com PHP MySQL Forums :