php-general Digest 2 Oct 2009 12:38:04 - Issue 6369
Topics (messages 298455 through 298476):
Re: Self-Process php forms or not?
298455 by: MEM
298458 by: Manuel Lemos
298463 by: kranthi
298466 by: Manuel Lemos
298467 by: Manuel Lemos
298469
php-general Digest 3 Oct 2009 02:00:29 - Issue 6370
Topics (messages 298477 through 298504):
Re: Parse Question Using list()
298477 by: Gerardo Benitez
Re: Self-Process php forms or not?
298478 by: MEM
298480 by: tedd
298481 by: tedd
298483 by: MEM
Hello
I noticed a problem using iconv, but investigation showed, that this is
not exectly the iconv itself, but something like php encoding.
From the beginning:
a hava an incoming variable $text;
it has some Polish diactics 'strona główna'.
I expect to remove diactics : 'strona glowna'.
So I
using the base tag is a solution to your problem if the links are relative..
http://www.w3schools.com/TAGS/tag_base.asp
but I am not sure if base tag works outside html/html
try... base href=URL/base before curl_init()
where URL is parsed using PHP's parse_url() function on http://example.com
I try to avoid the use of hidden form elements as much as possible,
especially for tracking whether a user has submitted a form or not...
I use name=submit for the submit button instead, that will pass the
value of the submit button to the action script.
above all i use a template engine, smarty
i dont have any idea about your problem, but just an idea
have you used https://localhost in the browser while trying to check
_SERVER['SERVER_PORT'] ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks Manuel your input is greatly appreciated.
Jerome
-Original Message-
From: Manuel Lemos [mailto:mle...@acm.org]
Sent: 01 October 2009 20:46
To: Jerome Botbol
Cc: php-general@lists.php.net
Subject: Re: PHP/MySQL Superstars
Hello,
on 10/01/2009 10:09 AM Jerome Botbol said the
Hello,
on 10/02/2009 04:41 AM kranthi said the following:
I try to avoid the use of hidden form elements as much as possible,
especially for tracking whether a user has submitted a form or not...
I use name=submit for the submit button instead, that will pass the
value of the submit button
I would recommend using an open framework like yui/dojo/jquery for ALL
your javascript needs..(i personally prefer jquery) each of the above
mentioned frameworks have wysiwyg editors of their own.
try using http://code.google.com/p/jwysiwyg/ i doubt it will conflict
with your javascript with
That only works if the user clicks on that submit button. If the user
hits the enter key in a text input, the form is submitted but the submit
input variable is not set. That is why an hidden input is a safer solution.
i doubt that, because i use the above mentioned method in nearly all
of my
and yes i forgot to mention... i avoid hidden form elements because
they can be modified very easily and hence pose a security threat.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2009-10-02 at 12:51 +0530, kranthi wrote:
using the base tag is a solution to your problem if the links are relative..
http://www.w3schools.com/TAGS/tag_base.asp
but I am not sure if base tag works outside html/html
try... base href=URL/base before curl_init()
where URL is
On Fri, 2009-10-02 at 13:55 +0530, kranthi wrote:
and yes i forgot to mention... i avoid hidden form elements because
they can be modified very easily and hence pose a security threat.
You say you don't use hidden fields because they can be modified too
easily, yet you say you check for the
You say you don't use hidden fields because they can be modified too
easily, yet you say you check for the submit button? Which out of the
two do you do, as last time I checked, modifying one form field is as
easy as changing any other!
I completely agree with you. changing submit text is as
Some browser security settings may not allow you to run Javascript code
that exists on another server though
not many users use those kind of browsers, because if they do most of
the websites which use CDNs will not work.
Firstly, it is not a good idea to fetch an entire web page and snow it
to
On Fri, 2009-10-02 at 15:59 +0530, kranthi wrote:
not many users use those kind of browsers, because if they do most of
the websites which use CDNs will not work.
I've read that the upcoming Firefox 4 may have some features built in
for this sort of thing, and there are plugins out there for
I've read that the upcoming Firefox 4 may have some features built in
for this sort of thing, and there are plugins out there for most
browsers that can do this as an added layer of security.
Sorry but I could not understand what you meant by this
coming back to original problem... you should
Use the tool that PHP provides for such problems.
http://php.net/fgetcsv
fgetcsv is very useful, here a example:
?php
$row = 1;
/* load file*/
$handle = fopen(log.csv, r);
/* read line by line */
while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) {
$num = count($data);
echo p
I want to apologize to you all. I have mentioned two things on the same
basket, but it was not appropriate. Since a confirmation page is not the
same thing as a success page.
Let's forget about the confirmation page, since it's not required.
I'm now understanding that even if the form is
On Fri, 2009-10-02 at 18:07 +0530, kranthi wrote:
I've read that the upcoming Firefox 4 may have some features built in
for this sort of thing, and there are plugins out there for most
browsers that can do this as an added layer of security.
Sorry but I could not understand what you meant
At 1:55 PM +0530 10/2/09, kranthi wrote:
and yes i forgot to mention... i avoid hidden form elements because
they can be modified very easily and hence pose a security threat.
That depends upon how sloppy you are in coding.
NONE of my hidden variables pose any security problems whatsoever.
At 3:06 PM +0100 10/2/09, MEM wrote:
I want to apologize to you all. I have mentioned two things on the same
basket, but it was not appropriate. Since a confirmation page is not the
same thing as a success page.
Let's forget about the confirmation page, since it's not required.
I'm now
At 4:29 PM -0400 10/1/09, Robert Cummings wrote:
I'm a superstar... send me a check for $500,000 and I'll fly on over.
Or did you completely misuse the word superstar?
Cheers,
Rob.
Rob:
Well, in my book you are a superstar.
Cheers,
tedd
--
---
http://sperling.com
You can set it up any number of ways. There is no
absolute need for a redirect. Everything can be
done in one form, or not -- your choice.
Cheers,
tedd
Yes. But since I don't want to display a success information + form fields,
but only the success information,
I believe the only way we
At 3:35 PM +0100 10/2/09, MEM wrote:
You can set it up any number of ways. There is no
absolute need for a redirect. Everything can be
done in one form, or not -- your choice.
Cheers,
tedd
Yes. But since I don't want to display a success information + form fields,
but only the success
Yes. But since I don't want to display a success information + form fields,
but only the success information,
I believe the only way we have to do this is by either use javascript and
update a div or similar, or using only php, by redirecting to another page.
Is this correct?
Whether or not
?PHP
$num = 123;
$num = $num++;
print $num; //this prints 123 and not 124 ?!!
$num = 123;
$num = ++$num;
print $num; //this prints 124 as expected
$num = 123;
$num++;
print $num; //this prints 124 as expected
$num = 123;
print $num++; //this prints 123 and not 124 ?!!
print $num++; //this NOW
Can someone PLEASE explain why the developers of PHP chose this seemingly
whacky logic?
It mimicks C.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daevid Vincent wrote:
?PHP
$num = 123;
$num = $num++;
print $num; //this prints 123 and not 124 ?!!
$num = 123;
$num = ++$num;
print $num; //this prints 124 as expected
$num = 123;
$num++;
print $num; //this prints 124 as expected
$num = 123;
print $num++; //this prints 123 and not 124 ?!!
- Original Message
From: Ben Dunlap bdun...@agentintellect.com
To: Daevid Vincent dae...@daevid.com
Cc: php-general@lists.php.net
Sent: Fri, October 2, 2009 2:06:47 PM
Subject: Re: [PHP] Whacky increment/assignment logic with $foo++ vs ++$foo
Can someone PLEASE explain why the
-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Friday, October 02, 2009 2:12 PM
To: Daevid Vincent
Cc: php-general@lists.php.net
Subject: Re: [PHP] Whacky increment/assignment logic with
$foo++ vs ++$foo
Daevid Vincent wrote:
?PHP
$num =
My issue is that I see no reason to do the ASSIGNMENT FIRST and THEN
INCREMENT.
That's just counter intuitive. In the case of $foo = $num++, everything to
the right of the = should be computed FIRST and THEN handed off to the left
side. This particular expression (and I'm unaware of any
On Fri, Oct 2, 2009 at 17:28, Daevid Vincent dae...@daevid.com wrote:
Personally I've never (in almost 20 years) done an assignment like $foo =
$foo++ as I always use just $foo++ or $foo += 1 or something, hence the
reason today is the day a co-worker stumbled upon this and was as confused
as
On Fri, Oct 2, 2009 at 17:42, Daniel Brown danbr...@php.net wrote:
but rather by something just slightly more advanced:
?php
$num = file_get_contents('visitcount.txt');
if(isset($_GET['countme'])) {
echo You are visitor #.++$num.br /\n;
file_put_contents($num);
}
?
On Fri, Oct 2, 2009 at 2:37 PM, Ben Dunlap bdun...@agentintellect.com wrote:
My issue is that I see no reason to do the ASSIGNMENT FIRST and THEN
INCREMENT.
That's just counter intuitive. In the case of $foo = $num++, everything to
the right of the = should be computed FIRST and THEN handed
Hello,
on 10/02/2009 05:23 AM kranthi said the following:
That only works if the user clicks on that submit button. If the user
hits the enter key in a text input, the form is submitted but the submit
input variable is not set. That is why an hidden input is a safer solution.
i doubt that,
Hello,
on 10/02/2009 07:11 AM kranthi said the following:
You say you don't use hidden fields because they can be modified too
easily, yet you say you check for the submit button? Which out of the
two do you do, as last time I checked, modifying one form field is as
easy as changing any
-Original Message-
From: Ben Dunlap [mailto:bdun...@agentintellect.com]
Sent: Friday, October 02, 2009 2:58 PM
To: php-general@lists.php.net; Daevid Vincent
Subject: Re: [PHP] Whacky increment/assignment logic with
$foo++ vs ++$foo
mind-blowing. What the heck /is/ supposed
On Oct 2, 2009, at 15:22, Daevid Vincent wrote:
-Original Message-
From: Ben Dunlap [mailto:bdun...@agentintellect.com]
Sent: Friday, October 02, 2009 2:58 PM
To: php-general@lists.php.net; Daevid Vincent
Subject: Re: [PHP] Whacky increment/assignment logic with
$foo++ vs ++$foo
int a = 2;
b = a++;
printf(b = [%d]\n, b);
b would be 2 when printed. However, after the second line (b = a++;)
finished executing, a would then be 3.
Sure, but that code is perfectly clear. It's the odd special case
where you assign the variable to itself, that's
Daevid Vincent wrote:
-Original Message-
From: Ben Dunlap [mailto:bdun...@agentintellect.com]
Sent: Friday, October 02, 2009 2:58 PM
To: php-general@lists.php.net; Daevid Vincent
Subject: Re: [PHP] Whacky increment/assignment logic with
$foo++ vs ++$foo
mind-blowing. What
I was hoping someone might be able to help me with something. In a recent
effort to learn PHP/mySQL, I decided to design a mock forum. Many forums
(such as phpBB) allow a user to pick their timezone and to select if DST
should be applied. I'm trying to figure out how its done. Currently, I'm
42 matches
Mail list logo