[PHP] query order issue

2013-07-20 Thread dealTek
Hi all,


I have a page that starts with several mysql sql query searches and displays 
data below...

then I added a form (with hidden line "do-update" value "UPDATE") on the same 
page with action to same page...


then above other sql queries - I put...

if ((isset($_POST["do-update"])) && ($_POST["do-update"] == "update")) {

---do update query---

echo '';

}

but it shows error that happens AFTER the meta http-equiv="refresh" has happened


Catchable fatal error: xxx on line 226



BTW - the meta http-equiv="refresh" does work but the error flashes 1st for a 
second...

Q: I would have thought that it would not go past the line - meta 
http-equiv="refresh" - but it does any insight on this






--
Thanks,
Dave - DealTek
deal...@gmail.com
[db-3]



[PHP] strip_tags

2013-07-20 Thread Tedd Sperling
Hi gang:

I've been using

$str = strip_tags($str, $allowable)

as it is described via the manuals:

http://php.net/manual/en/function.strip-tags.php

The problem I've found is the tags "" and "" are not stripped.

How do you strip all tags, but leave some tags (such as , , and  -- I 
know these are depreciated, but my client wants them anyway).

Cheers,

tedd

_
t...@sperling.com
http://sperling.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: query order issue

2013-07-20 Thread Jim Giner

On 7/20/2013 12:21 PM, dealTek wrote:

Hi all,


I have a page that starts with several mysql sql query searches and displays 
data below...

then I added a form (with hidden line "do-update" value "UPDATE") on the same 
page with action to same page...


then above other sql queries - I put...

if ((isset($_POST["do-update"])) && ($_POST["do-update"] == "update")) {

---do update query---

echo '';

}

but it shows error that happens AFTER the meta http-equiv="refresh" has happened


Catchable fatal error: xxx on line 226



BTW - the meta http-equiv="refresh" does work but the error flashes 1st for a 
second...

Q: I would have thought that it would not go past the line - meta 
http-equiv="refresh" - but it does any insight on this






--
Thanks,
Dave - DealTek
deal...@gmail.com
[db-3]


YOu are checking for a value of 'update' but you stated that the value 
clause was 'UPDATE'



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: query order issue

2013-07-20 Thread Jim Giner

On 7/20/2013 12:21 PM, dealTek wrote:

Hi all,


I have a page that starts with several mysql sql query searches and displays 
data below...

then I added a form (with hidden line "do-update" value "UPDATE") on the same 
page with action to same page...


then above other sql queries - I put...

if ((isset($_POST["do-update"])) && ($_POST["do-update"] == "update")) {

---do update query---

echo '';

}

but it shows error that happens AFTER the meta http-equiv="refresh" has happened


Catchable fatal error: xxx on line 226



BTW - the meta http-equiv="refresh" does work but the error flashes 1st for a 
second...

Q: I would have thought that it would not go past the line - meta 
http-equiv="refresh" - but it does any insight on this






--
Thanks,
Dave - DealTek
deal...@gmail.com
[db-3]


YOu are checking for a value of 'update' but you stated that the value 
clause was 'UPDATE'



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip_tags

2013-07-20 Thread Frank Arensmeier
20 jul 2013 kl. 18:25 skrev Tedd Sperling :

> Hi gang:
> 
> I've been using
> 
>$str = strip_tags($str, $allowable)
> 
> as it is described via the manuals:
> 
> http://php.net/manual/en/function.strip-tags.php
> 
> The problem I've found is the tags "" and "" are not stripped.
> 
> How do you strip all tags, but leave some tags (such as , , and  -- 
> I know these are depreciated, but my client wants them anyway).
> 
From the manual:
allowable_tags
You can use the optional second parameter to specify tags which should not be 
stripped.

Note:
HTML comments and PHP tags are also stripped. This is hardcoded and can not be 
changed with allowable_tags.

Note:
This parameter should not contain whitespace. strip_tags() sees a tag as a 
case-insensitive string between < and the first whitespace or >. It means that 
strip_tags("", "") returns an empty string.

It's all there… ;-)

Cheers,
/frank


> Cheers,
> 
> tedd
> 
> _
> t...@sperling.com
> http://sperling.com
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strip_tags

2013-07-20 Thread Tedd Sperling

On Jul 20, 2013, at 5:34 PM, Frank Arensmeier  wrote:

> 20 jul 2013 kl. 18:25 skrev Tedd Sperling :
> 
>> Hi gang:
>> 
>> I've been using
>> 
>>   $str = strip_tags($str, $allowable)
>> 
>> as it is described via the manuals:
>> 
>> http://php.net/manual/en/function.strip-tags.php
>> 
>> The problem I've found is the tags "" and "" are not stripped.
>> 
>> How do you strip all tags, but leave some tags (such as , , and  -- 
>> I know these are depreciated, but my client wants them anyway).
>> 
> From the manual:
> allowable_tags
> You can use the optional second parameter to specify tags which should not be 
> stripped.
> 
> Note:
> HTML comments and PHP tags are also stripped. This is hardcoded and can not 
> be changed with allowable_tags.
> 
> Note:
> This parameter should not contain whitespace. strip_tags() sees a tag as a 
> case-insensitive string between < and the first whitespace or >. It means 
> that strip_tags("", "") returns an empty string.
> 
> It's all there… ;-)
> 
> Cheers,
> /frank
> 

Yeah, but that wasn't the problem -- it was my mistake in coding.

In any event, I figured it out.

tedd


_
t...@sperling.com
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php