Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass serialized binary data

Status
Not open for further replies.
Jun 14, 1999
606
US
Hello,<br><br>I want to pass serialized data between forms like that<br><FONT FACE=monospace><br>&lt;?php<br>$bindata = serialize( $something );<br>?&gt;<br>&lt;input type=&quot;hidden&quot; name=&quot;bindata&quot;<br>&lt;?php<br>&nbsp;&nbsp;echo &quot;value=\&quot;.$bindata.&quot;\&quot; &gt;\n&quot;;<br>?&gt;<br></font><br>But I want to do it safely... remembering $bindata contains null and other dangerous bytes. Then I want to decode that in the receiving form:<br><FONT FACE=monospace><br>&lt;?php<br>&nbsp;&nbsp;$data = unserialize( $bindata );<br>?&gt;<br></font><br>What pair of functions can I use to code/decode the serialized data to safe Latin-1 text that can be written in the &lt;input&gt; tag?<br><br>SMTIA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top