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
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
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
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
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
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.
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
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
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:
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
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
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?
--
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
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
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
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
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
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
[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,
[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
[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
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
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
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
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)
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
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
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
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 =
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
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
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;
}
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.
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
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?
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
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) {
//
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
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
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
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
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:
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
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
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
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\
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
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
[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
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,
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
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
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
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
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',
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
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 =
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
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
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
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
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
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/
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
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?
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
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
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,
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
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 /
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
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:
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
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
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
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
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 ==.
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
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
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
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
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
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
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 :
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
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 :
86 matches
Mail list logo