<?php
	
	
	
	//$con = mysql_connect('localhost', 'root', '');
	$con = mysql_connect('localhost', 'pcpomoc_potni', 'boroko');
	if (!$con){
			echo('Could not connect: ' . mysql_error());
	}
	//mysql_select_db("potni_stroski", $con);
	mysql_select_db("pcpomoc_potni", $con);
	mysql_query("SET NAMES 'utf8'") or die(mysql_error());
	mysql_query("SET lc_time_names = 'sl_SI'") or die(mysql_error());
	mysql_query("UPDATE nalog SET datum='{$_POST[0]}', pot='{$_POST[1]}', km='{$_POST[2]}', cena='{$_POST[3]}' WHERE id='{$_POST[6]}' LIMIT 1") or die(mysql_error());
	mysql_close($con);
	
	echo "Uspešno shranjeno!";
?>