run code inside editor php
run code inside editor php

Folowing code is working with $_GET
html: ajax: '../code.php?user=$loged_user',
php ->where( 'user', $_GET['user'] )
but $_GET function is not secure and it can be bypassed by passing dfferent value. I wanted to replace $_GET with direct php function, but adding code directly is not working and shows errors:
// DataTables PHP library and database connection
include( "lib/DataTables.php" );
$loged_user = some function;
This question has accepted answers - jump to:
Answers
What error goes it result in? As long as the function returns a string, you can replace
$_GET['user']
there.Typically a session variable would be used if you are attempting to limit the access by a user id.
Allan
Thankyou - it turns it was my mistake and one dependent function was not corectlly loaded in my funtion. Problem solved!