Peter Lauri wrote:
> Hi,
>
> Example code that I try to run in version 4.3.11:
>
> Class Page {
> private $myID;
> function Page() {
> $this->myID=1;
> }
>
> function getID() {
> return $this->myID;
> }
>
>
Hi,
Example code that I try to run in version 4.3.11:
Class Page {
private $myID;
function Page() {
$this->myID=1;
}
function getID() {
return $this->myID;
}
}
But I get erro
Hi everyone,
I am trying to open a new window after a successful function call (I
don't want to use \n";
echo "
window.open(\"add.html\",\"resizable=no,width=400,height=200\");";
echo "\n\n";
}
else
Hello everyone,
I'm having some problems with one of our servers. Recently Plesk overwrote
our configuration file, and I'm trying to get the thing back online. To make
a long story short, I've got PHP working with http, but now that I've got the
https virtual host set up, php doesn't work wit
Sjef Janssen wrote:
Hallo,
I have a form with a number of checkboxes grouped together. The value of
these boxes is stored in an array: $used[]. Now I found that the value of
checked boxes (value = 'Y') are stored in the array while non checked boxes
are not stored at all. This makes the array inc
Their should be no problem with what your trying to do, try the
following function, should act pretty much like array_diff();
if(!function_exists('array_diff')) {
function array_diff($array1, $array2)
{
$difference = array();
foreach($array1 as $key => $value)
William Stokes wrote:
> Hello
>
> What is the best way to determine if a variable has no value?
>
> if ($var= '')
>
> or
>
> if ($var= 'null')
>
>
> Can 'null' be used here?
Look at isset() and empty()
Cheers
--
David Robley
You cannot achieve the impossible without attempting the absurd
If your talking values in submitted form data I would use:
if(isset($var) && trim($var) == '') {
echo "Please give a value";
}
James
William Stokes wrote:
Hello
What is the best way to determine if a variable has no value?
if ($var= '')
or
if ($var= 'null')
Can 'null' be used h
alter the sendmail configuration file: /etc/mail/local-host-names
If that dont work you need to setup DNS for your machine.
James Benson wrote:
You need a domain name pointing to your IP address for a start, then you
either need to configure php.ini to use the correct email or you should
p
Do something like:
$checkboxes = array('food','drink','smoking');
// display the checkboxes
foreach($checkboxes as $checkbox) {
echo "$checkbox: ";
}
Then when processing the form input check if each of the $checkboxes
array values are present, if not, you can set to something else s
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Nope. That's the problem. If a checkbox is unchecked the browser do
On 1/11/06, Duffy, Scott E <[EMAIL PROTECTED]> wrote:
>
> This is what I use to send email via php. I have sent hundreds at once.
>
>
> $fromname="Cohen, Dotan";
> $fromaddress="[EMAIL PROTECTED]";
> $subject ="Subject";
> $message="message body";
> $from=" [EMAIL PROTECTED]";
>
Would it be enough to set a key for each checkbox, for example explicitly
say:
checkbox[1]
checkbox[2]
checkbox[3]
then a non checked box will have an empty string as a value, whereas the
checked ones will have a value of 'Y'.
Sjef
"David Dorward" <[EMAIL PROTECTED]> schreef in bericht
news:[E
This is what I use to send email via php. I have sent hundreds at once.
$fromname="Cohen, Dotan";
$fromaddress="[EMAIL PROTECTED]";
$subject ="Subject";
$message="message body";
$from=" [EMAIL PROTECTED]";
$headers = "MIME-Version: 1.0\n";
$headers
On 1/11/06, M. Sokolewicz <[EMAIL PROTECTED]> wrote:
>
> remember though that
> if(!$x) {
>echo 'nothing here';
> }
>
> will also output 'nothing here' when provided with the string '0'!
That's because (!$x) means ($x == false) and '0' is false...
Gerry
Sjef Janssen wrote:
> I have a form with a number of checkboxes grouped together. The value of
> these boxes is stored in an array: $used[]. Now I found that the value of
> checked boxes (value = 'Y') are stored in the array while non checked
> boxes are not stored at all. This makes the array inc
Gerry Danen wrote:
On 1/11/06, M. Sokolewicz <[EMAIL PROTECTED]> wrote:
remember though that
if(!$x) {
echo 'nothing here';
}
will also output 'nothing here' when provided with the string '0'!
That's because (!$x) means ($x == false) and '0' is false...
Gerry
I know that, and you know
On 1/11/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
> actually I don't mind it - especially as I'm not on the apache or
> fedora lists ;-)
>
> and with regard to sending out emails I find using a connection with
> an SMTP server (local or not) is alot less hassle with regard to bounces
> and stuff (
I'm reading in a 66MB file into php so I can parse it and load it into a
database. However, it is taking a long time for php to read the file.
So long that the script times out. I know about the
ini_set("max_execution_time", 120) or whatever length I want to set the
time out for the script, but
On 1/10/06, Sameer N Ingole <[EMAIL PROTECTED]> wrote:
> Dear Dotan,
> Dotan Cohen wrote:
>
> >On my home Fedora Core 4 box I run Apache 2.0. Sometimes when sending
> >mail with php no mail is delivered, and I find this in the logs:
> >
> ><<< 550-Verification failed for <[EMAIL PROTECTED]>
> ><<<
what would the chance be that the OP actually knows Portuguese and could
read that?
---
I don't know what is the chance, but the example in this page doesn't
requires to know portuguese.
Sorry if you don't speak portuguese. Sorry for my poor english.
zerof
--
PHP General Mailing Li
> Hallo,
> I have a form with a number of checkboxes grouped together.
> The value of
> these boxes is stored in an array: $used[]. Now I found that
> the value of
> checked boxes (value = 'Y') are stored in the array while non
> checked boxes
> are not stored at all. This makes the array incomp
>> I'm reading in a 66MB file into php so I can parse it and load it into a
>> database. However, it is taking a long time for php to read the file.
>> So long that the script times out. I know about the
>> ini_set("max_execution_time", 120) or whatever length I want to set the
>> time out fo
Hallo,
I have a form with a number of checkboxes grouped together. The value of
these boxes is stored in an array: $used[]. Now I found that the value of
checked boxes (value = 'Y') are stored in the array while non checked boxes
are not stored at all. This makes the array incomplete as I want to h
I'm reading in a 66MB file into php so I can parse it and load it into a
database. However, it is taking a long time for php to read the file.
So long that the script times out. I know about the
ini_set("max_execution_time", 120) or whatever length I want to set the
time out for the script, b
You need a domain name pointing to your IP address for a start, then you
either need to configure php.ini to use the correct email or you should
pass the additional param to sendmail, as shown below.
Taken from php.net:
The additional_parameters parameter can be used to pass an additional
p
I'm reading in a 66MB file into php so I can parse it and load it into a
database. However, it is taking a long time for php to read the file. So long
that the script times out. I know about the ini_set("max_execution_time", 120)
or whatever length I want to set the time out for the script, b
You may want to check this list of Authentication related code examples :
http://www.weberdev.com/search.php3?searchtype=category&category=Authenticat
ion&secondary=&IsSub=1
Sincerely
berber
Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP code examples : http://w
test
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I think I answered my own question. The following works even when
mod_rewrite has changed the URL:
'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, January 11, 2006 11:33 am, Brian Dunning wrote:
> How do I capture the current displayed URL when it has been changed
> by mod_rewrite?
>
> Example:
> original (ugly) URL is http://domain.com?id=12345
> displayed (friendly) URL is http://domain.com/California
>
> When I use 'http://'.$_SERV
Try; http://www.php.net/manual/en/function.getimagesize.php
Warren
At 09:16 AM 1/11/2006, M. Sokolewicz wrote:
zerof wrote:
William Stokes escreveu:
Hello,
Can I get pixel sizes from a uploaded web applicable image with PHP? I
mean width and height as pixels. If so How?
Thanks
-Will
--
How do I capture the current displayed URL when it has been changed
by mod_rewrite?
Example:
original (ugly) URL is http://domain.com?id=12345
displayed (friendly) URL is http://domain.com/California
When I use 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] that
only gives me the origi
zerof wrote:
William Stokes escreveu:
Hello,
Can I get pixel sizes from a uploaded web applicable image with PHP? I
mean width and height as pixels. If so How?
Thanks
-Will
--
http://www.educar.pro.br/abc/mathgd/index.php?xyz=30
zerof
what would the chance be that the OP actu
and phpmailer - thats also be known to help me from myself (when it
comes to
make a pig's ear of using the mail() function) - 3 cheers for Richard Heyes
(you just know a class rocks when you can actually name the author by
heart! :-).
Actually it's HTMLMimeMail - phpmailer is someone elses. :-
Dotan Cohen wrote:
On 1/10/06, Sameer N Ingole <[EMAIL PROTECTED]> wrote:
Dear Dotan,
You know cross-posting is bad..?
...
actually I don't mind it - especially as I'm not on the apache or
fedora lists ;-)
and with regard to sending out emails I find using a connection with
an SMTP server
remember though that
if(!$x) {
echo 'nothing here';
}
will also output 'nothing here' when provided with the string '0'!
- tul
Rodolfo Andrade wrote:
I do use if(!$var) for simple application. Only _IF_ I need to know if the
$var is defined but empty or so I would use especific functions.
-
On 1/11/06, enediel gonzalez <[EMAIL PROTECTED]> wrote:
> Hello
>
> I've a site with a .htaccess defined, the users have to enter the login and
> password to get in,
> Is it possible on php to ask the apache server wich user is using the
> current session?
$_SERVER['REMOTE_USER']
-robin
I do use if(!$var) for simple application. Only _IF_ I need to know if the
$var is defined but empty or so I would use especific functions.
- Original Message -
From: Stut
To: Rodolfo Andrade
Cc: William Stokes ; php-general@lists.php.net
Sent: Wednesday, January 11, 2006 11:49 AM
Subject
William Stokes escreveu:
Hello,
Can I get pixel sizes from a uploaded web applicable image with PHP? I mean
width and height as pixels. If so How?
Thanks
-Will
--
http://www.educar.pro.br/abc/mathgd/index.php?xyz=30
zerof
--
PHP General Mailing List (http://www.php.net/)
To unsub
Hello
I've a site with a .htaccess defined, the users have to enter the login and
password to get in,
Is it possible on php to ask the apache server wich user is using the
current session?
I'd like to give the users the oportunity to change their password but
without ask again who are you.
Cheers!
:)
""Albert"" <[EMAIL PROTECTED]> kirjoitti
viestissä:[EMAIL PROTECTED]
> William Stokes wrote:
>> Can I get pixel sizes from a uploaded web applicable image with PHP? I
>> mean width and height as pixels. If so How?
>
> http://www.php.net/manual/en/function.getimagesize.php
>
> HTH
>
>
Rodolfo Andrade wrote:
How about...
if (!$x){
echo "x is empty";
}
Because $x could be an empty string, 0, false, null or undefined. If
that's what you need to check for then knock yourself out.
-Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
William Stokes wrote:
> Can I get pixel sizes from a uploaded web applicable image with PHP? I
> mean width and height as pixels. If so How?
http://www.php.net/manual/en/function.getimagesize.php
HTH
Albert
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.
Will,
William Stokes wrote:
> Can I get pixel sizes from a uploaded web applicable image with PHP? I mean
> width and height as pixels. If so How?
http://www.php.net/getimagesize
David
--
David Grant
http://www.grant.org.uk/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
I would say this is what you need
http://uk2.php.net/manual/en/function.getimagesize.php
Dan
-Original Message-
From: William Stokes [mailto:[EMAIL PROTECTED]
Sent: 11 January 2006 12:22
To: php-general@lists.php.net
Subject: [PHP] Image size?
Hello,
Can I get pixel sizes from a uploa
Hello,
Can I get pixel sizes from a uploaded web applicable image with PHP? I mean
width and height as pixels. If so How?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stefan Reimers wrote:
Try
array get_class_vars ( string class_name)
This will return an array with at least the public variables.
Mathijs wrote:
Is there a way to check how much/which variables there are in an class?
Thx in advanced.
It works, but only for the public indeed.
Is there also
I think calculating directly in MySQL will be faster, since less data will
be "travelling" from MySQL to PHP.
Just my 2¢.
Regards,
Rodolfo Andrade
- Original Message -
From: Weber Sites LTD
To: 'Peter Lauri' ; php-general@lists.php.net
Sent: Wednesday, January 11, 2006 6:07 AM
Subject:
How about...
if (!$x){
echo "x is empty";
}
Regards,
Rodolfo Andradee
- Original Message -
From: Stut
To: William Stokes
Cc: php-general@lists.php.net
Sent: Wednesday, January 11, 2006 8:08 AM
Subject: Re: [PHP] test variable value?
William Stokes wrote:
>Hello
>
>What is the
Try
array get_class_vars ( string class_name)
This will return an array with at least the public variables.
Mathijs wrote:
Is there a way to check how much/which variables there are in an class?
Thx in advanced.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
William Stokes wrote:
Hello
What is the best way to determine if a variable has no value?
if ($var== '')
or
if ($var== 'null')
Can 'null' be used here?
Depends what you mean by no value. I suggest you read
http://php.net/is_null, http://php.net/empty and http://php.net/isset.
-Stut
William Stokes wrote:
Hello
What is the best way to determine if a variable has no value?
if ($var== '')
or
if ($var== 'null')
Can 'null' be used here?
yeah buts its a string which doesn't do what you want.
if (empty($var)) { echo 'yes'; }
or:
if (is_null($var)) { echo 'yes'; }
T
Hello
What is the best way to determine if a variable has no value?
if ($var== '')
or
if ($var== 'null')
Can 'null' be used here?
Thanks
-Willa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello
What is the best way to determine if a variable has no value?
if ($var= '')
or
if ($var= 'null')
Can 'null' be used here?
Thanks
-Willa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
George Pitcher wrote:
Mathijs wrote:
Is there a way to have include() be case-insensitive?
If you are know that all your file and directory names are lower case, but
users may input mixed case responses that will be used to determine the
include, you can set the case of the user input to lowe
Is there a way to check how much/which variables there are in an class?
Thx in advanced.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mathijs wrote:
> Is there a way to have include() be case-insensitive?
If you are know that all your file and directory names are lower case, but
users may input mixed case responses that will be used to determine the
include, you can set the case of the user input to lower case with
strtolower()
Why not check it?
Try to query for the AVG() and get the result or query for the data
and do a loop in PHP to calculate the AVG. Check the time each
Takes.
My Money is that getting the value from SQL will be faster.
Sincerely
berber
Visit the Weber Sites Today,
To see where PHP might tak
Assume that I save data about an object and it has 10.000 observations of
the object stored in a MySQL database. I want calculate the average value of
a column, is it faster done by using PHP on the result array or using the
MySQL function to do that?
MySQL.
You don't have to transfer all 10,00
Hi,
this is very stupid because you can have files in a directory named:
PleaSeINCLUDeMe.php
pleaseincludeme.php
and if you do a case insensitive include which one should be included?
The include stuff works insensitive under windows great because the
filesystem does not permit 2 file with the s
61 matches
Mail list logo