Forum Moderators: coopster

Message Too Old, No Replies

Restriction issue

         

Marked

9:17 am on Jul 10, 2009 (gmt 0)

10+ Year Member



I'm trying to create a component for joomla, and on most of their pages(the ones I need to use include(); in) have the following restriction code in them:

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?

eelixduppy

12:48 am on Jul 11, 2009 (gmt 0)



I'm not sure I'm following you completely here. Where does "_JEXEC" get defined in the first place? What is prohibiting it from being defined on the action page? Can you please elaborate...