
why echo not come out?
<html><body>
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post">
Working hour : <input name="workout" type="text"/><input name="submit1" type="submit" value="submit"/>
<?php
if (isset($_POST['submit1']))
{
$jamBkerja= $_POST['jamBkerja'];
function gaji($jamBkerja)
{
if(($jamBkerja<=20)&&($jamBkerja>0))
{
$total=$jamBkerja*3.5;
return $total;
echo "<br>Your salary is : RM ".gaji($jamBkerja);
}
}
?>
</form>
</body></html>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.