Welcome Guest, Not a member yet? Register   Sign In
session problem

it seems above that you will be redirected to index.php/processor (index.php?c=controller),
but not. It will be requested on the fly - it will be executed without reloading the page.


      $.post('index.php?c=processor', { //or $.post('index.php/processor'
        //list of post variable follows
        samplevar      : 'addrequisition',
        samplevar2     : $("[name=username]").val()
        //...more variable
        alert(data); //display the echo from processor.php
                     //If you echo "hello world" in processor.php
                     //and after calling ajax then hello world alerted
                     //it means that you requested the processor.php successfully
                     //note: data variable holds the values echoed from processor.php


so you where just saying that i just need to pass another variable to to processor.php?


  die('no direct access allowed');
  echo 'hello world';

nice it fixed my problem regarding direct access to scripts

var obj = {
get_user_online: function(){
   var url="<?=base_url()?>index.php/generals/getuseronline";
         document.getElementById("divuserlist")[removed] = data;

that calls in
//php script
function getuseronline(){    
      $strReturn = 'Hello world';
      $strReturn = 'No direct access allowed';
echo $strReturn;

so when ever the link type in directly into the browser "http://localhost/CI/index.php/generals/getonlineuser"
it returns a "No direct access allowed'

@paulon did it solve the problem?


yes, it resolves the problem.. +1 to you CI_avatar..

You're welcome Pau.

Kitakits next time.

sure makati area ako.. tnx and merry xmas..

Theme © iAndrew 2016 - Forum software by © MyBB