Welcome Guest, Not a member yet? Register   Sign In
403 error in AJAX to Controller
#6

(10-27-2019, 07:12 AM)ciadmin Wrote: You need to provide a lot more information than just this, before anyone can help you.
The only thing someone could point out is that a 403 is "access forbidden", if that helps.
View->textbox.php
Code:
<div style="text-align:center;">
    <input id="txt_short" type="text"/>
    <input id="btn_short" type="submit" value="Go" />
    <p id="show"></p>
</div>
<script>
                $(document).ready(function(){
                $("#btn_short").click(function(){
                var l =$("#txt_short").val();
                $.ajax({type:"POST",url:"../../App/Controllers/Links.php",data:"?l="+l,done:function(msg){
                    $("#show").html(data);
                        }});
                     });
                 });
</script>

Controller->Links.php
PHP Code:
class Links extends Controller
{
        public function index()
        {
                helper('html');
                helper('form');
                $p$_POST["li"];
        }

Reply


Messages In This Thread
RE: 403 error in AJAX to Controller - by ciadmin - 10-27-2019, 07:12 AM
RE: 403 error in AJAX to Controller - by anonymous5421 - 10-27-2019, 08:20 AM
RE: 403 error in AJAX to Controller - by mintwint - 10-27-2019, 07:22 AM
RE: 403 error in AJAX to Controller - by ecampait - 10-27-2019, 07:55 AM
RE: 403 error in AJAX to Controller - by InsiteFX - 10-28-2019, 03:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB