Welcome Guest, Not a member yet? Register   Sign In
Javascript problem
#1

[eluser]C_Line[/eluser]
Code:
echo "< script >
     var res = confirm('Apakah aset barang yang dipilih berhubungan dengan $barang[0] ?')
     if(res == true){
     res = $vidaset;
     }
     </script >";

$vidsub = "[script]document . write(res)[/script]";
echo $vidsub;

the problem is, when i save $vidsub to database it save in char not int
but when i echo , the value is int
i don't want to pass from function

sorry my bad english
thx
#2

[eluser]micfai[/eluser]
Before inserting into the database you can type it as an integer using (int) in PHP or pasrseInt() in Javascript.




Theme © iAndrew 2016 - Forum software by © MyBB