1

basically this doesn't work: $oTexteinfo = new Texteinfo($_POST['idTexteInfo']); even though i can see that there's an ID

so this is where i click to get the id

a href='#' data-s=".$_GET['s']." data-action=sup data-idTexteInfo=".$aoTexteinfos[$i]->getidTexteInfo()."

and in my ajax

    var id =  this.getAttribute("data-idTexteinfo");

    $.ajax({
        url:"../controleurs/ajax/adm_gererTexteinfo.php",
        method: "post",
        data: { s: iS, action: sAction, idTexteinfo:id}

and this in my class

    public function __construct($idTexteInfo=1,$sDescTexteInfo="",$enumTexteInfo=""){
        $this->setidTexteInfo($idTexteInfo);
        $this->setsDescTexteInfo($sDescTexteInfo);
        $this->setenumTexteInfo($enumTexteInfo);
    }

    public function setidTexteInfo($idTexteInfo){   
        TypeException::estNumerique($idTexteInfo);
        $this->idTexteInfo = $idTexteInfo;
    }
    public function getidTexteInfo(){    
        return $this->idTexteInfo;
    }

the error it gives me is Undefined index: idTexteInfo

Does anyone know how to fix this? it works with some classes and doesnt with some other classes, which is like a copy paste of this class. Thank you in advance.

Frank Lexer
  • 310
  • 1
  • 11

0 Answers0