Discussion:
Problem with self processing xhtml/php
Jeffry Killen
2014-01-21 02:12:25 UTC
Permalink
Hello;

I have scripted a self processing form that uses object oriented code
in PHP Version 5.3.15
running on Apache 2x on Mac OSX 10.6x.

The script in the page instantiates an object that handles are the
post requests for various
form elements in the same page.

In this situation I am having trouble with markup strings being
duplicated rather that replaced.
I have had this working in a former version that did not use as much
OO code.

The problem has appeared with the use of concatenation operator; .=
that obviously
seemed to create two copies of the string that was supposed to be
added instead of
one.

I revised the script to eliminate the need for accumulating string
content in a single
variable.

Having been through the mill with finding and debugging logic and
syntax problems
I think I can safely say I haven't missed something.

Has anyone encountered problems with use of concatenation in a OOP
code context
that uses static method calls?

There is another possible factor that I am not ruling out:

I encountered instruction in a published text, early on in my
adventures with php,
that stated that a browser that had a self processing page loaded, may
automatically
use ajax asycronus requests.

This would explain why the duplicate code; the original is not
replaced because the page
does not actually reload completely.

I have not been subscribed to this list for quite a while. But this
seems to be something
that would be worthy of attention here.

Thanks to anyone for time, attention and suggestion
JK
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Giner
2014-01-21 02:20:25 UTC
Permalink
Post by Jeffry Killen
Hello;
I have scripted a self processing form that uses object oriented code in
PHP Version 5.3.15
running on Apache 2x on Mac OSX 10.6x.
The script in the page instantiates an object that handles are the post
requests for various
form elements in the same page.
In this situation I am having trouble with markup strings being
duplicated rather that replaced.
I have had this working in a former version that did not use as much OO
code.
The problem has appeared with the use of concatenation operator; .= that
obviously
seemed to create two copies of the string that was supposed to be added
instead of
one.
I revised the script to eliminate the need for accumulating string
content in a single
variable.
Having been through the mill with finding and debugging logic and syntax
problems
I think I can safely say I haven't missed something.
Has anyone encountered problems with use of concatenation in a OOP code
context
that uses static method calls?
I encountered instruction in a published text, early on in my adventures
with php,
that stated that a browser that had a self processing page loaded, may
automatically
use ajax asycronus requests.
This would explain why the duplicate code; the original is not replaced
because the page
does not actually reload completely.
I have not been subscribed to this list for quite a while. But this
seems to be something
that would be worthy of attention here.
Thanks to anyone for time, attention and suggestion
JK
Is this a type or something you meant to type:

concatenation operator; .= that

Are you referring to ".=" or "; .=" in your post?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Lester Caine
2014-01-21 09:51:34 UTC
Permalink
The problem has appeared with the use of concatenation operator; .= that obviously
seemed to create two copies of the string that was supposed to be added instead of
one.
http://www.php.net/manual/en/language.operators.string.php

Pretty self explanatory, so can you show the code where you are getting the
duplication ...
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Continue reading on narkive:
Loading...