como faço para definir essas variavel
Notice: Use of undefined constant getUser - assumed 'getUser' in C:\wamp\www\cursos\prophp\projeto\admin\posts\categorias-create.php on line 2
=====estas se refere ao compos do form===========
Notice: Undefined variable: f in C:\wamp\www\cursos\prophp\projeto\admin\posts\categorias-create.php on line 44 Call Stack #TimeMemoryFunctionLocation 10.0005689544{main}( )..\index2.php:0 20.0148974432require
Notice: Undefined variable: f in C:\wamp\www\cursos\prophp\projeto\admin\posts\categorias-create.php on line 54 Call Stack #TimeMemoryFunctionLocation 10.0005689544{main}( )..\index2.php:0 20.0148974432require
Notice: Undefined variable: f in C:\wamp\www\cursos\prophp\projeto\admin\posts\categorias-create.php on line 59 Call Stack #TimeMemoryFunctionLocation 10.0005689544{main}( )..\index2.php:0 20.0148974432require
<?php
if(function_exists(getUser)){
if(!getUser($_SESSION['autUser']['id'],'1')){
echo '<span class="ms al">Desculpe,voce não tem permissão para gerenciar categorias!</span>';
}else{
?>
<div class="bloco form" style="display:block">
<div class="titulo">criar categoria:
<a href="index2.php?exe=posts/categorias" title="criar nova categoria" class="btn" style="float:right;">voltar</a>
</div>
<?php
if(isset($_POST['sendForm'])){
$f['nome'] = htmlspecialchars($_POST['nome']);
$f['content'] = htmlspecialchars($_POST['content']);
$f['tags'] = htmlspecialchars($_POST['tags']);
$f['date'] = htmlspecialchars($_POST['data']);
if(in_array('',$f)){
echo '<span class="ms al">Desculpe,voce não tem permissão para gerenciar categorias!</span>';
}else{
$f['data'] = formDate($f['date']); unset($f['date']);
$f['url'] = setUri($f['nome']);
$readCatUri = read('up_cat',"WHERE url LIKE '%$f[url]%'");
if($readCatUri){
$f['url'] = $f['url'].'-'.count($readCatUri);
$readCatUri = read('up_cat',"WHERE url ='$f[url]'");
if($readCatUri){
$f['url'] = $f['url'].'-'.time();
}
}
create('up_cat',$f);
echo '<span class="ms al">categorias criada com suscesso!</span>';
}
}
?>
<form name="formulario" action="" method="post">
<label class="line">
<span class="data">Nome:</span>
<input type="text" name="nome" value="<?php if($f['nome']) echo $f['nome'];?>" />
</label>
<label class="line">
<span class="data">Descrição:</span>
<textarea name="content" rows="3"><?php if($f['content']) echo $f['content'];?></textarea>
</label>
<label class="line">
<span class="data">Tags:</span>
<input type="text" name="tags" value="<?php if($f['tags']) echo $f['tags'];?>" />
</label>
<label class="line">
<span class="data">Data:</span>
<input type="text" name="data" value="<?php if($f['date']) { echo $f['date']; }else{ echo date('d/m/y H:i:s'); }?>" />
</label>
<input type="submit" value="send" name="sendForm" class="btn" />
</form>
</div><!-- /bloco form -->
<?php
}}else{
header('Location: ../index2.php');
}
?>
</body>
</html>Discussão (7)
Carregando comentários...