On Wednesday 13 July 2011 11:09:45 Jay Ess wrote:
> On 2011-07-13 09:54, Karl DeSaulniers wrote:
> > $cc = "ema...@domain.com ,ema...@doamin.com,ema...@domain.com ,
> > ema...@domain.com, "
>
> $cc = trim($cc,",");
> $result = preg_replace('/(\s?)(,)(\s?)/i', ',', $cc);
The solution is broken beca
On Saturday 25 June 2011 01:24:10 Andre Polykanine wrote:
> Maybe I'm off topic, but wouldn't you consider JavaScript form
> validation? That will make your task easier and the user will see
> his/her error much earlier, before he/she submits the form.
JavaScript validation is useful
On Friday 24 June 2011 21:44:05 Chris Stinemetz wrote:
> if (!array_key_exists($_POST['store_type'], $choices)) {
>
> echo "You must select a valid choice.";
Nothing wrong to me. Perfectly valid way of checking if there is
On Friday 24 June 2011 17:28:08 Chris Stinemetz wrote:
> That worked perfectly!
And will work, until you decide to put quotes in button name for some reason.
And until some malicious user forge POST request with
$_POST['post_tptest'] = "'; DROP DATABASE; --"
But you can use prepared statements to
On Friday 17 June 2011 04:50:00 Daevid Vincent wrote:
> > I've seen too many people over the years try and rally against common
> > sense practices like using prepared statements for perhaps a marginal
> > gain of performance on one page while their load averages are 0,0,0.
>
> Agreed. The ONLY tim
On Tuesday 07 June 2011 13:35:06 Richard Quadling wrote:
> Hi.
>
> What do you get for ...
>
> php -r "var_dump(realpath(null));"
>
1.
PHP 5.3.6 @ Gentoo Linux(x86_64)
tmp $ php -r "print getcwd();"
/var/tmp
tmp $ php -r "var_dump(realpath(null));"
string(8) "/var/tmp"
2.
PHP 5.2.14 @ Linux(ARM
On Wednesday 25 May 2011 07:05:18 Negin Nickparsa wrote:
> my code is this:
> $query1="select * from patient where id=".$_POST['txt'];
> it works but
Holy Jesus!
Can't wait to send to your server POST request with txt="1;DROP DATABASE; --"
Of course, if you'll switch to prepare statement instead
quot;;
> > echo strcmp('b', 'a'), "\n";
My result is:
13 -17 1
I'm runninng PHP 5.2.14 on the ARM Linux with uClibc.
Certainly the result depends on architecture and/or libc, because PHP just
calls system strcmp, nothing more.
So. to write compatible scri
t;
> tst1=-9223372036854775808, tst1_eq=-9223372036854775808,
> tst1_type=integer
> tst2=9.22337203685E+18, tst2_eq=-9223372036854775808, tst2_type=double
>
I get similar results with 5.3 on my amd64 host too. It works as it should, no
weirdness. Glad to know that 5.3 get
think, I should live with it, until I manage somehow to upgrade
PHP installation for that board.
--
Vitalii Demianets
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
integer
And I totally can not understand, why in the hell tst1_eq=0 ?
(BTW I'm using PHP 5.2.14 on 32-bit CPU, if that matters)
Sorry if this is well-known feature and have discussed before. In such a case
please point me to the URL of the discussion.
--
Vitalii Demianets
--
PHP Genera
11 matches
Mail list logo