Jump to content
N3lson

[Resolvido] Call undefined function ( mas função existe)

Recommended Posts

N3lson

bom dia

Estou-me a deparar com um erro de Call undefined function, mas essa função existe


    $id = isset($_GET['id']) ? $_GET['id'] : FALSE;   
    $act = isset($_GET['act']) ? $_GET['act'] : FALSE;  

      	 if($act){
		 switch($act){
			 case'comp':
			 form_comp($id);
			 break;
			 case'trof':
			 form_trof($id);
			 break;
			 case'demo':
			 form_demo($id);
			 break;
			 case'exam':
			 form_exam($id);			     
			 break;  
		 }
           }

Função declarada no script


function form_demo($x){
	  echo '<div class="wrapper">
	  <div class="widget">
	    <div class="title"><h6>' .$txt_var .'</h6></div>
	    <form class="form"  action="./sql/sql_compet.php" method="post">
	    <input name="id" value="'.$x.'" type="hidden"/> 
	    <input name="go" value="dem_o" type="hidden"/>
	    <label><b>Demonstração:</b></label>
	    <input type="text" name="desc"  size="65" />
	    <label><b>Data:</b> </label>
	    <input type="text" name="data" placeholder="AAAA-MM-DD"  size="10" />
				 <br />
				  <div align="center">
				  <input id="button1" type="submit" value="Inserir"/>
				  <input id="button2" type="reset"  value="Reset"/>
				  </div>
			    </form>
			    </div></div>';
}

esta execução vem de um link administrar.php?id='.$id.'&act=demo


You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Share this post


Link to post
Share on other sites
N3lson

Nota: Esta função encontra-se num include, mas o problema não é do include pois uma outra função chamada acima fora deste if funciona bem ...

Edited by N3lson

You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Share this post


Link to post
Share on other sites
HappyHippyHippo

e paths ? isso está tudo bem ?

tens a certesa que o ficheiro está a ser incluido correctamente ? não vês problema nenhum nos logs do teu servidor web ?


IRC : sim, é algo que ainda existe >> #p@p

Share this post


Link to post
Share on other sites
N3lson

Sim o ficheiro está a ser incluído correctamente pois existe uma função acima chamada que se encontra nesse mesmo ficheiro e se activar a call dessa função o script executa, este que se encontra dentro do switch não


You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Share this post


Link to post
Share on other sites
N3lson

Boas, afinal está correcto a tua info, a função mostrava pois estava definida noutro script.

Obrigado !!!

RESOLVIDO


You can't do it, kid. But don't worry, my boy. You're not the only one. No one else can do it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.