PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → Transferring data between pages
Transferring data between pages
Started by Aaron Edge, Jul., 30 2018 5:27 PM - No answer
Posted on July, 30 2018 - 5:27 PM
Hello,
I am attempting to transfer large and complex data structures between pages in webdev 23.

I am just wondering what is the best method to transfer this data.

The method that I have attempted involved serialising the structure into a buffer using the XML format, then passing the xml formatted buffer to the next page in the page parameters. Then deserialise the buffer in the onload (PHP server) back into a structure.

CODE:
// structures in the global declaration
STbar is Structure
myValue is string
END

STfoo is Structure
myBar is STbar
END

// code in php server
myFoo is STfoo
myFoo.myBar.myValue = "The Value"

bufXmlBuffer is Buffer
Serialize(myFoo,bufXmlBuffer,psdXML)
Trace(bufXmlBuffer)

// result from trace of bufXmlBuffer
<?xml version="1.0" encoding="ISO-8859-1"?><\r><\n><DOCUMENT xmlns:SOAP_ENC="http://schemas.xmlsoap.org/soap/encoding/"><\r><\n> <STfoo id="id0"><\r><\n> <myBar href="#id1"/><\r><\n> </STfoo><\r><\n> <STbar id="id1"><\r><\n> <myValue>The Value</myValue><\r><\n> </STbar><\r><\n></DOCUMENT><\r><\n>

stNewFoo is STfoo
Deserialize(stNewFoo,bufXmlBuffer,psdXML)
Trace(stNewFoo.myBar.myValue)

//Trace of stNewFoo.myBar.myValue is blank

I had previously tried the same thing with psdJSON but later found that deserialise psdJSON is not supported in php.

My question is does serialise and deserialise work in php? am I just using it incorrectly?

I would be grateful for any advice or input on this matter,
thanks in advanced.