I have a newbie issue with PHP functions calls. File:
<?php
session_start();
include("../conexionbbdd.php");
include("../conexionapi.php");
$id = $_SESSION['id'];
$inclass = $_SESSION['inclass'];
if($_SESSION['estado'] == 'activo'){
if($inclass==='1'){
checkCost();
}
else{
sendMessage();
}
function checkCost(){
//DO WHATEVER
}
function sendMessage(){
//DO WHATEVER
}
}else{
header('location:../login.php');
}
?>
Console emerges an error ( ! ) Fatal error: Call to undefined function checkCost() in C:\wamp\www[removedbyme]\actions\msg_newMessage.php on line 14