Jump to content
php.lv forumi

profila bilde!


millers

Recommended Posts

Dod man savas koda daļas, es apvienošu.

 

if ($_FILES['profila_bilde'])
{
 if (check_if_jpeg($_FILES['profila_bilde']['tmp_name']))
{
	  $data = file_get_contents($_FILES['profila_bilde']['tmp_name']);
	  mysql_query('UPDATE profili SET bilde = `'.base64_encode($data).'`',$dbLink);
}
}

 

profila_bilde.php?user_id=xxx

$xxx = (int) $_GET['xxx'];
$r = mysql_query("SELECT bilde FROM profili where id ={$xxx}");
list($data) = mysql_fetch_array($r);

header(..);
print base64_decode($data);

Edited by Delfins
Link to comment
Share on other sites

lieta tada kad man ira tikai login skripts pagidam vell nesmu iemacijies ka uztaisti pasam savu profilu kurs uzrada niku!!! gribetu uztaisti login skriptu taka dr.lv kur ira viss apraksts par profilu un skaisti var pievienot savu bildi! ja man butu tads logins un file upload es butu happy! :)

Link to comment
Share on other sites

×
×
  • Create New...