0
votes

I have a php script embeded into a Joomla! article via sorcerer plugin.

The embedded php script contains/renders a simple html form. The submit action submits to the same script with an added parameter (?action='submit').

Script checks whether this parameter is set thusly:

if(isset($_GET['action')){
// do the sql insert 
}else
{
//render the form
}

The submit action :

<input type='submit' value='Sumbit' action='http://wwww.mydomain.org.uk/page?     
action=submit'>

Now, the issue is that each and every time the submit button is pressed, the logged in user is logged out from Joomla!, and the database session expires.

This started to happen after the host upgraded my Joomla! to be on a different server. Can anyone help me?

1
We can't really help you without seeing the code in the script… - Craig
<?php if (isset($_GET['action'])){ $db =& JFactory::getDBO(); $insert_sql= "INSERT INTO KOSRequest (user_id,created,IGN,LKL,KOS,Status) VALUES (".$user_id.",".$date.",'".$_POST['IGN']."',". $_POST['LKL'].",'".$_POST['KOS']."'"; $db->setQuery($insert_sql); $db->execute(); } else { - Simon Brodie
echo" <form name='kos_entry' action='ospalliance.org.uk/JOOM/2-uncategorised/…' method='POST'> Player IGN <input type='text' name='IGN' required /><br /> Player Location :<input type='number' name='LKL' required /><br /> Reason: <textarea rows='4' cols='50' name='KOS'></textarea><br /> <input type='submit' value='Sumbit'>"; } ?> - Simon Brodie
Sorry that the code is split into 2 sections - it's too long to fit as comment otherwise - Simon Brodie
Don't put code in the comments, edit your question and add it there - Craig

1 Answers

0
votes

It seems a sort of conflict issue with some native joomla parameters our code execution about the session handling.

If you need joomla customization, consultancy or expertise team visits our site http://storejoomla.org