Inlineedit changing all my datatimes element (like date_time element)

jmdc

Member
Hello,

I am using Fabrik 3.3.2 and i have inlineedit plugin installed.
When i change some data using this plugin and save that, all my datatime elements in that list are changing to -1 hour.

Do you have any idea about why this plugin is doint that?

If i enter directly into this form and change the same elements, all my datatime still remain with no changes...
Could you help me, please?

thank you a lot.

Best regards.
 
In my form php plugin, i have:

$option = array()
$option['driver'] = 'dbname';
$option['host'] = 'dbhostname';
$option['user'] = 'user';
$option['password'] = 'password';
$option['database'] = 'dbname';
$option['prefix'] = '';

$db = JDatabaseDriver::getInstance( $option );
$myrowid = '{rowid}';


$myQuery4 = "SELECT date_time FROM table WHERE id='$myrowid'";
$db->setQuery($myQuery4);
$datetime = $db->loadResult();

$servername = "dbhostname";
$username = "user";
$password = "password";
$dbname = "dbname";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
mysqli_set_charset($conn, "utf8");

if($datetime > strtotime('2016-07-22 00:00:00')){
$sql = "UPDATE table SET date_time= '2016/07/23' WHERE id = '$myrowid'";
$result=mysqli_query($conn,$sql);
}
else{
$sql = "UPDATE table SET date_time= '2016/07/22' WHERE id = '$myrowid'";
$result=mysqli_query($conn,$sql);
}
$conn->close();
echo "<script>parent.window.location.reload(true);</script>";

Why is this not working??

Thank you in advance.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top