Jump to content
Fórum Script Brasil
  • 0

como retirar esse Notice: Undefined index: acao in


thamiriscristine
 Share

Question

 

Notice: Undefined index: acao in C:\wamp\www\jeccelulares\admin\frm_categoria.php on line

Notice: Undefined index: id in C:\wamp\www\jeccelulares\admin\frm_categoria.php on line 5 

 

<?php
include "conexao.php";

$acao =$_POST["acao"];

$id   =$_POST["id"];

$txt_categoria ==$_POST["txt_categoria"];

if  ($acao == "Inserir")
{
    $sql = "INSERT INTO categoria (categoria) VALUES ('$txt_categoria')";
    mysql_query($sql) or die ("não foi possivel inserir os dados");

    echo "<script type = 'text/javascript'> location.href ='index.php?link=2'</script>";

}

if ($acao==Alterar)

 

 

1.JPG

2.JPG

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      149.9k
    • Total Posts
      646.8k
×
×
  • Create New...