Forum Moderators: coopster
defined( '_JEXEC' ) or die( 'Restricted access' );
That's fine, but my component is a form that inserts data into a database using functions.
The function code is:
if(isset($_GET['function']) && $_GET['function'] =="add")
And the relevant form code is:
<form action="name.php?function=add">
So the error is when you click ok on the form, the url becomes "http://websitename/name.php?function=add"(?function=add is added to the end of the url), and I get a restriction error.
How can I make it recognize that '_JEXEC' is defined so the function will fun?