Skip to content

Instantly share code, notes, and snippets.

@olupotd
Created March 11, 2014 13:26
Show Gist options
  • Save olupotd/9485545 to your computer and use it in GitHub Desktop.
Save olupotd/9485545 to your computer and use it in GitHub Desktop.
<?
$value[] = null;
$result = mysql_query("SELECT * FROM users WHERE uname='$uname'") or die(mysql_error());
$row = mysql_fetch_array($result);
if($row)
{
$title = $row['title'];
$val = unseralize($row['values']);
for ($val as $v){
$value[] = unseralize($v);
}
/*
Serializing data especially binary data is not safe. I'd suggest you use json. it's much safer and easier to manipulate.
check this below:
$orilang = json_decode($lang,true);
orilang contains the array
*/
echo $orilang['photo'];
}
else{
}
for ($i = 0; $i < count($value); ++$i)
{
echo $value[$i];
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment