Jump to content

Unserializing data


bullbreed

Recommended Posts

I want to put the unserialized data into a table and came up with this;

$sql = "SELECT `sec1`, `sec1other`, `sentdate` FROM `trainingdata` WHERE `username`='".$_GET['username']."'";
$sql_query = mysql_query($sql) or trigger_error(mysql_error());
if (mysql_num_rows($sql_query) > 0) {
while ($data = mysql_fetch_assoc($sql_query)) {
$sec1 = unserialize ($sec1['sec1']);

?>
<tr>
    	<td width="50%"><?php echo $data['sec1']; ?></td>
        <td><?php echo $data['sec1other']; ?></td>
        <td width="20%"><?php echo $data['sentdate']; ?></td>
    </tr>

 

Doesn't work. Anyone any ideas.

Link to comment
https://forums.phpfreaks.com/topic/189911-unserializing-data/
Share on other sites

This is somethiing I took from a tutorial and cant get it to work.

I see what you mean about the variable. Thanks for that.

$sec1 was the original variable I created for data from the initial form submission

 

Any more reasons how I messed it up.  :wtf:

Link to comment
https://forums.phpfreaks.com/topic/189911-unserializing-data/#findComment-1002102
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.