i wanted to retrive a piece of python code from the database.
The javascript variable c1 is working properly but the following c2,c3,c4 and c5 is not showing the data wheres all the php variables are showing the data properly.
What might be the reason and what can be the solution?
I have tried to use javascript and php togather to get the desired result as I am going to pass the variables on a javascript function. php variables are showing the data but the javascript variable c1 is getting the data but c2,c3,c4 and c5 are not getting the data
echo "<script> var c1 = '".$code_1."'; </script>";
echo "<script> var c2 = '".$code_2."'; </script>";
echo "<script> var c3 = '".$code_3."'; </script>";
echo "<script> var c4 = '".$code_4."'; </script>";
echo "<script> var c5 = '".$code_5."'; </script>";
// c1 works properly
echo "<script>alert(c1);</script>";
// c2,c3,c4,c5 doesn't works
echo "<script>alert(c2);</script>";