I do scripting in my PC on XAMPP localhost. I need to use ffmpeg but I can not install or enable it on xampp V3.3. I tried many and many and many ways but believe me no one of them worked for me. I read and followed all of old similar questions but either not working or the packages could not be found. By the way I can not find .dll file to download that are mentioned in most answers. I really need help.
I use windows 10.
Category: PHP
Category Added in a WPeMatico Campaign
I can’t add parameters to my WordPress site’s URL
I’m a Web Development Student and it’s the first time I use WordPress. But, for my internship, I have to add a page to a website using WordPress.
So, on my WordPress site page, I display data retrieved from an API. I use the wpgetapi and code snippet plugins to first retrieve the API and then display it via PHP code.
I would like to be able to paginate so that I don’t have to display all the data at once. I did some research and found a method to paginate by adding a parameter to my website’s URL.
Like this :
<div class="pagination">
<?php
if ($total_pages > 1) {
echo '<nav class="pagination">';
if ($page > 1) {
// Previous button
echo '<a href="?page=' . ($page - 1) . '">« Previous</a>';
}
for ($i = 1; $i <= $total_pages; $i++) {
if ($i == $page) {
// Current page
echo '<span>' . $i . '</span>';
} else {
// Other page button
echo '<a href="?page=' . $i . '">' . $i . '</a>';
}
}
if ($page < $total_pages) {
// Next button
echo '<a href="?page=' . ($page + 1) . '">Next »
</a>';
}
echo '</nav>';
}
?>
</div>
Except that every time I want to add this query parameter by clicking on the link made for it, no parameter is added. I have the 301 Redirect plugin active which removes this parameter every time. But even when I disable it, the problem persists. Do you have any idea where this could come from?
Thanks in advance.
I tried to use the wppagenavi plugin, to disable the 301 Redirect.
how to change the default number of items per page
I’d like to change the default amount of items displayed in a list (25 currently).
I have looked in the doc unsuccessfully.
Thanks
Pimcore/Symfony Bundle with custom token authentication for custom controller
I am completely struggling to get a custom bundle in Pimcore working as expected. I have a controller in this bundle that must be secured by a token authentication (like a Bearer token). This is my security.yml in BUNDLE_DIR/Resources/config/security.yml:
security:
providers:
noop_user_provider:
id: MyVendorPimcoreApiBundleSecurityNoopUserProvider
firewalls:
api:
pattern: ^/api
stateless: true
guard:
authenticators:
- MyVendorPimcoreApiBundleSecurityTokenAuthenticator
access_control:
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
My controller route is as follows (via annotations):
/**
* @param string $id
* @return JsonResponse
* @Route("/api/read/{id}", name="myvendor_pimcore_api_read", methods={"GET"})
*/
public function read(string $id): JsonResponse
{
return $this->json([
'message' => 'Hello from your custom API! You ID was: '.$id,
]);
}
And my services.yml (directory: BUNDLE_DIR/Resources/config/services.yml) has the following entry:
MyVendorPimcoreApiBundleSecurityTokenAuthenticator:
arguments:
$validToken: 'sampleToken123'
tags:
- { name: security.guard_authenticator }
And whatever I tried, I cannot get it to work. If I try to include my security.yml via DependencyInjection, I get an error:
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new LoaderYamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader->load('security.yaml');
}
I get this error: There is no extension able to load the configuration for “security” (in “/var/www/html/bundles/MyVendor/PimcoreApiBundle/DependencyInjection/../Resources/config/security.yaml”). Looked for namespace “security”, found “none”.
I also tried multiple other things, which all resulted in more or less the same issue. Can someone help me here? I just want to my controller to be secured…
How to solve error while installing php-gd on oracle linux 7 for php 7.4
Trying to install php-gd on Oracle Linux 7 with php7.4. But getting bellow error:
Error: Package: php-oci8-7.4.33-15.el7.remi.x86_64 (remi-php74)
Requires: libclntsh.so.21.1()(64bit)
You could try using --skip-broken to work around the problem
** Found 8 pre-existing rpmdb problem(s), 'yum check' output follows:
compat-libstdc++-33-3.2.3-72.el7.i686 has missing requires of libgcc_s.so.1
compat-libstdc++-33-3.2.3-72.el7.i686 has missing requires of libgcc_s.so.1(GCC_3.0)
compat-libstdc++-33-3.2.3-72.el7.i686 has missing requires of libgcc_s.so.1(GCC_3.3)
compat-libstdc++-33-3.2.3-72.el7.i686 has missing requires of libgcc_s.so.1(GLIBC_2.0)
libXext-1.3.3-3.el7.i686 has missing requires of libX11.so.6
libXi-1.7.9-1.el7.i686 has missing requires of libX11.so.6
libXi-devel-1.7.9-1.el7.i686 has missing requires of pkgconfig(xfixes)
libXtst-1.2.3-1.el7.i686 has missing requires of libX11.so.6
Followed all the instructions above, nothing works.
how to filter a wpdatatables table using a self coded html filter bar
I designed a html bar which is better suited to the project am currently working on and would like to integrate it with wpdatatables, the built in filter for the plugin does not meet the standard which i want.
below is the code filter bar.
My approach here is to filter multiple tables and charts with the same filter.
I have looked up their documentation but could not find anything that could help me as regards this.
<head>
</head>
<body>
<div class="combined-bar">
<div class="rxsearch-section">
<div class="rxsearch-icon" id="searchIcon">
</div>
<input type="text" class="rxsearch-input" id="searchInput" placeholder="Search..." onfocus="expandSearchInput()"
onblur="shrinkSearchInput()">
</div>
<button class="rxfilter-button" onclick="toggleFilterPopup()">
<span class="rxfilter-text">Filters</span>
</button>
<div class="filter-popup-wrapper" id="filterPopupWrapper" onclick="closeFilterPopup(event)">
<div class="filter-popup" id="filterPopup">
<div class="rxfilter-popup-header">
<h3>Filter</h3>
<span class="close-button" onclick="toggleFilterPopup()">×</span>
</div>
<div class="rxcategory-toggle-buttons">
<div class="toggle-switch" id="toggleSwitch" onclick="toggleCategory()">
<div class="toggle"></div>
<div class="moption">Options</div>
<div class="moption">Year</div>
</div>
</div>
<div class="filter-popup-content">
<div class="category options show" id="optionsCategory">
<!-- Options will be dynamically inserted here -->
</div>
<div class="category" id="yearCategory">
<div class="moption">
<input type="radio" id="year1" name="year" value="2024" checked>
<label for="year1">2024</label>
</div>
<div class="moption">
<input type="radio" id="year2" name="year" value="2023">
<label for="year2">2023</label>
</div>
<div class="moption">
<input type="radio" id="year3" name="year" value="2022">
<label for="year3">2022</label>
</div>
</div>
</div>
<div class="button-group">
<button class="apply-button" onclick="applyFilters()">
Apply filter
</button>
<button class="clear-button" onclick="clearFilters()">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor"
Clear filter
</button>
</div>
</div>
</div>
<div class="rxoptions-section">
<div class="option active" id="Submissions">Submissions</div>
<div class="option" id="Actors">Actors</div>
<div class="option" id="Victims">Victims</div>
<div class="option" id="Issues">Issues</div>
</div>
<script>
function expandSearchInput() {
document.getElementById('searchIcon').style.opacity = '0';
document.getElementById('searchIcon').style.width = '0';
document.getElementById('searchInput').style.flexGrow = '1.2';
}
function shrinkSearchInput() {
if (document.getElementById('searchInput').value === '') {
document.getElementById('searchIcon').style.opacity = '1';
document.getElementById('searchIcon').style.width = '20px';
document.getElementById('searchInput').style.flexGrow = '1';
}
}
document.addEventListener('DOMContentLoaded', function () {
const options = document.querySelectorAll('.option');
const clearIconButton = document.getElementById('clearIconButton');
let activeOptionId = null;
options.forEach(option => {
option.addEventListener('click', () => {
options.forEach(opt => opt.classList.remove('active'));
document.querySelectorAll('div[id$="-content"]').forEach(content => content.style.display = 'none');
option.classList.add('active');
activeOptionId = option.id;
const contentDiv = document.getElementById(option.id + '-content');
if (contentDiv) {
contentDiv.style.display = 'block';
} else {
console.warn('Content div not found for option:', option.id);
}
clearIconButton.style.display = 'none';
});
});
document.getElementById('optionsCategory').classList.add('show');
clearIconButton.style.display = 'none';
clearIconButton.addEventListener('click', clearFilters);
const defaultActiveOption = document.querySelector('.option.active');
if (defaultActiveOption) {
activeOptionId = defaultActiveOption.id;
}
});
let filtersSelected = false;
function toggleFilterPopup() {
const filterPopupWrapper = document.getElementById('filterPopupWrapper');
filterPopupWrapper.classList.toggle('show');
}
function closeFilterPopup(event) {
if (event.target.id === 'filterPopupWrapper') {
toggleFilterPopup();
}
}
function clearFilters() {
document.getElementById('year1').checked = true;
document.querySelectorAll('.filter-popup-content input[type="checkbox"]').forEach(el => el.checked = false);
filtersSelected = false;
updateClearIconButton();
}
function applyFilters() {
const checkboxes = document.querySelectorAll('.filter-popup-content input[type="checkbox"]');
const radios = document.querySelectorAll('.filter-popup-content input[type="radio"]');
filtersSelected = Array.from(checkboxes).some(checkbox => checkbox.checked) || Array.from(radios).some(radio => radio.checked);
updateClearIconButton();
toggleFilterPopup();
}
function toggleCategory() {
const toggleSwitch = document.getElementById('toggleSwitch');
const optionsCategory = document.getElementById('optionsCategory');
const yearCategory = document.getElementById('yearCategory');
toggleSwitch.classList.toggle('active');
optionsCategory.classList.toggle('show');
yearCategory.classList.toggle('show');
if (optionsCategory.classList.contains('show') && activeOptionId) {
const activeOption = document.getElementById(activeOptionId);
if (activeOption) {
activeOption.classList.add('active');
const contentDiv = document.getElementById(activeOptionId + '-content');
if (contentDiv) {
contentDiv.style.display = 'block';
}
}
}
}
document.addEventListener('DOMContentLoaded', function () {
const options = document.querySelectorAll('.option');
const optionsCategory = document.getElementById('optionsCategory');
const optionsData = {
Submissions: [
{ value: 'Total Submissions', label: 'Total Submissions' },
{ value: 'Pending Submissions', label: 'Pending Submissions' },
{ value: 'Approved Submissions', label: 'Approved Submissions' }
],
Actors: [
{ value: 'Actors', label: 'Actors' },
{ value: 'Activists', label: 'Activists' },
{ value: 'Executive', label: 'Executive' },
{ value: 'Judiciary', label: 'Judiciary' },
{ value: 'Legislature', label: 'Legislature' },
{ value: 'Media', label: 'Media' },
{ value: 'NGOs', label: 'NGOs' },
{ value: 'Non-state actors', label: 'Non-state actors' },
{ value: 'Other actors', label: 'Other actors' },
{ value: 'Other government agencies', label: 'Other government agencies' },
{ value: 'Politicians/political parties', label: 'Politicians/political parties' },
{ value: 'Public intellectuals/commentators', label: 'Public intellectuals/commentators' },
{ value: 'Security agencies', label: 'Security agencies' },
{ value: 'Vulnerable persons/groups', label: 'Vulnerable persons/groups' },
],
Victims: [
{ value: 'Activists', label: 'Activists' },
{ value: 'Executive', label: 'Executive' },
{ value: 'Judiciary', label: 'Judiciary' },
{ value: 'Legislature', label: 'Legislature' },
{ value: 'Media', label: 'Media' },
{ value: 'NGOs', label: 'NGOs' },
{ value: 'Non-state actors', label: 'Non-state actors' },
{ value: 'Other actors', label: 'Other actors' },
{ value: 'Other government agencies', label: 'Other government agencies' },
{ value: 'Politicians/political parties', label: 'Politicians/political parties' },
{ value: 'Public intellectuals/commentators', label: 'Public intellectuals/commentators' },
{ value: 'Security agencies', label: 'Security agencies' },
{ value: 'Vulnerable persons/groups', label: 'Vulnerable persons/groups' },
],
Issues: [
{ value: 'Social welfare/safety net', label: 'Social welfare/safety net' },
{ value: 'Blasphemy', label: 'Blasphemy' },
{ value: 'Cyber attack', label: 'Cyber attack' },
{ value: 'Protest', label: 'Protest' },
{ value: 'Attack', label: 'Attack' },
{ value: 'FOI', label: 'FOI' },
{ value: 'Judicial action', label: 'Judicial action' },
{ value: 'Internet/telecoms/social media shutdown', label: 'Internet/telecoms/social media shutdown' },
{ value: 'Cyber fraud', label: 'Cyber fraud' },
{ value: 'Cyberbullying', label: 'Cyberbullying' },
{ value: 'Censorship', label: 'Censorship' },
{ value: 'Regulation', label: 'Regulation' },
{ value: 'Arrest/detention/harassment', label: 'Arrest/detention/harassment' },
]
};
function updateOptions(selectedOption) {
optionsCategory.innerHTML = '';
const options = optionsData[selectedOption];
options.forEach(option => {
const optionElement = document.createElement('div');
optionElement.classList.add('moption');
optionElement.innerHTML = `
<input type="checkbox" name="filter" value="${option.value}" id="${option.value}">
<label for="${option.value}">${option.label}</label>
`;
optionsCategory.appendChild(optionElement);
});
clearIconButton.style.display = 'none';
}
options.forEach(moption => {
moption.addEventListener('click', function () {
document.querySelector('.option.active').classList.remove('active');
moption.classList.add('active');
updateOptions(moption.id);
});
});
updateOptions(document.querySelector('.option.active').id);
});
</script>
</body>
</html>```
Does PHPunit reset local variables?
I have such as Testcase:
class GenerateTest extends AbstractTestCase
{
private int $requestTime = 0;
...
protected function setUp(): void
{
$this->requestTime = $_SERVER['REQUEST_TIME']; // this is not null, verified by var_dump()
parent::setUp();
}
protected function tearDown(): void
{
parent::tearDown();
$_SERVER['REQUEST_TIME'] = $this->requestTime;
}
I am getting the error
Cannot assign null to property GenerateTest::$requestTime of type int"
without a line number.
Even if I comment the lines in setup/teardown, I get the error. In the class are no further assignments to requestTime
.
Where does this come from?
If i use ?int
it works, but I want to understand the root cause.
Does PHPUnit “automagically” reset class variables?
EDIT:
<?php
declare(strict_types=1);
class Test extends PHPUnitFrameworkTestCase
{
private int $requestTime = 0;
protected function setUp(): void
{
$this->requestTime = $_SERVER['REQUEST_TIME']; // this is not null, verified by var_dump()
parent::setUp();
}
protected function tearDown(): void
{
parent::tearDown();
$_SERVER['REQUEST_TIME'] = $this->requestTime;
}
public function testFoo()
{
}
}
is NOT an MRE – problem is not reproducible here. This is an integration test in Magento 2 context, have to dig futher.
CODEIGNITER: I can’t input/search any words and not showing the datavalue from my database using select2
Selection of Items/Search of items
I have problem inputting a words i can’t input or click in the search box or maybe i have error in my code or in my script.
My View:
<select type="text" name="protitle" class="form-control" id="recipient-name123" required>
<option>Select Bus</option>
</select>
My script:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryvalidate/1.19.3/jquery.validate.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<script>
$(document).ready(function() {
$('#recipient-name123').select2({
ajax: {
url: '<?php echo base_url("projects/searchbus"); ?>',
type: 'POST',
dataType: 'json',
delay: 250,
data: function(params) {
return {
protitle: params.term
};
},
processResults: function(data) {
return {
results: $.map(data, function(item) {
return {
text: item.cat_name + " - " + item.cat_busnum,
id: item.cat_name + " - " + item.cat_busnum
};
})
};
},
cache: true
},
minimumInputLength: 1
});
});
</script>
This is my Model:
public function search_bus($protitle) {
$this->db->like('cat_name', $protitle);
$this->db->or_like('cat_busnum', $protitle);
$query = $this->db->get('assets_category');
return $query->result();
}
This is my controller:
public function searchbus()
{
$protitle = $this->input->post('protitle');
$data['results'] = $this->project_model->search_bus($protitle);
$this->load->view('backend/All_Projects', $data);
}
I just want to search in the select/dropdown and show the data from my database. Do have any suggestion to remove, edit, or add to my code to work? Thank you!
HTML/PHP auto redirect with multiple destination
im a newbie that still learn about php & python.
I have a running python app to check my web status.
I have 2 running website. one is the main website and the other is backup.
and my problem is.
is there any possible way to redirect automatically my 1st website to my 2nd web if my 1st web down?
Im thinking about.
before the visitor visiting my web.
there is a tunnel website that connected with my python bot.
that checking which website is still alive.
and redirect them automatically.
How to compile PHP on Windows with Visual Studio 2022 Community Edition
Overall problem
Microsoft only offers their latest installer called VisualStudioSetup.exe for community edition which is at the time of writing VS2022: https://visualstudio.microsoft.com/vs/older-downloads/
And I can’t compile a compatible PHP-binary with it.
Technical details
The problem I’m facing is that when you compile PHP from source (PHP 8.1, PHP 8.2, PHP 8.3) it is linked to MSVC 14.40. When you download from https://windows.php.net it is linked to MSVC 14.29.
Therefore the self-compiled PECL extensions are not compatible with the downloaded PHP binary.
Symptom
They won’t get loaded on startup with the following message:
Warning: PHP Startup: Can't load module 'php_jsmin.dll' as it's linked with 14.40, but the core is linked with 14.29 in Unknown on line 0
This does apply to all self-compiled extensions, not only jsmin.
Approaching the problem
I can’t install MSVC 14.29 only, because PHP needs two components:
- MSVC v142 – VS 2019 C++ x64 build tools (v14.29)
- C++ CMake tools for Windows
C++ CMake tools for Windows has a damn dependency:
- MSVC v143 – VS 2022 C++ x64 build tools (v14.40)
The php compile environment now always links against v14.40. This was no problem with Visual Studio 2019 Setup, but Microsoft forbids to download old community versions – You can only download Visual Studio 2022 Setup with that before mentioned dependency problem.
Question
How can I link against MSVC 14.29 when using Visual Studio 2022 Setup to compile PHP from source.
Thank you very much in advance!
how Convert Laravel project to script؟ [closed]
i have a laravel project. it is exam online system.
I want to convert it to script. but
I don’t know how to do it.
Unfortunately, I found little reference for it. and I got confused.
Can you guide me step by step?
For example, where is the script file written? Are there any requirements for it to be installed?
thanks al lot
I searched from AI and internet sources.
Eager Loading with Nested Relationships and Custom Accessors Causing Performance Issues
I’m working on an application using Laravel 10, and I’m facing a performance issue related to eager loading nested relationships and custom accessors.
Scenario:
I have three models: User, Post, and Comment.
A User has many Posts.
A Post has many Comments.
I have set up a custom accessor on the Post model to calculate the number of comments.
Here are the relevant parts of my models:
// User.php
class User extends Model
{
public function posts()
{
return $this->hasMany(Post::class);
}
}
// Post.php
class Post extends Model
{
protected $appends = ['comment_count'];
public function comments()
{
return $this->hasMany(Comment::class);
}
public function getCommentCountAttribute()
{
return $this->comments()->count();
}
}
// Comment.php
class Comment extends Model
{
public function post()
{
return $this->belongsTo(Post::class);
}
}
Problem:
In my controller, I’m trying to load all users with their posts and the number of comments on each post. Here’s how I’m doing it:
$users = User::with(['posts.comments'])->get();
The issue I’m facing is that this approach is causing a significant performance hit due to the N+1 query problem. The custom accessor getCommentCountAttribute is being called for each post, and it results in a new query being executed for each post’s comment count.
What I’ve Tried:
- Adding withCount: I tried to optimize it by using withCount in the controller like this:
$users = User::with(['posts' => function($query) {
$query->withCount('comments');
}])->get();
This works, but the problem is that it doesn’t use the custom accessor, so the comment_count attribute in the Post model isn’t populated.
- Using loadMissing: I attempted to use loadMissing to avoid loading already loaded relations:
$users->loadMissing('posts.comments');
But this doesn’t solve the performance issue as it still leads to excessive queries.
- Avoiding Custom Accessors: I considered avoiding the custom accessor altogether, but the accessor is used in multiple places in the application, and refactoring it would be cumbersome.
Is there a way to keep using the custom accessor while avoiding the N+1 query issue? How can I optimize this eager loading to reduce the number of queries while still getting the comment_count for each post efficiently? Any insights or alternative approaches would be greatly appreciated!
Laravel: Can’t run composer install fully with spark-stripe
I cloned a project recently on laravel 10.44 and i wanted to run composer install to make sure i have every installation. But upon coming to laravel/spark-stripe i was asked for authentication. I checked every other question regarding spark-stripe on stackoverflow.
I get the following error:
Failed to execute git clone --mirror -- https://ghp...Fd8:[email protected]/laravel/spark-stripe.git AppData/Local/Composer/vcs/git-github.com-laravel-s
park-stripe.git/
Cloning into bare repository 'AppData/Local/Composer/vcs/git-github.com-laravel-spark-stripe.git'...
remote: Repository not found.
fatal: repository 'https://github.com/laravel/spark-stripe.git/' not found
And yes i have set up a auth.json file for the authentication of spark.
Here is a more detailed error:
******************************************************************
You do not have a valid license to download this release (v4.3.1)!
******************************************************************
Failed to download laravel/spark-stripe from dist: The "https://spark.laravel.com/dist/laravel/spark-stripe/laravel-spark-stripe-6502033e85f96852f450fd2861daaa6cd04aa598-zip-c53fe0.zip" file could not be downloaded (HTTP/2 422 ):
{"warning":"nn******************************************************************nYou do not have a valid license to download this release (v4.3.1)!n************************************************...
Now trying to download from source
Can’t run an php artisan command either now because of an autoload.php and app.php error:
Fatal error: Uncaught Error: Class "IlluminateFoundationApplication" not found in PhpstormProjectsmanagementbootstrapapp.php on line 14
Error: Class "IlluminateFoundationApplication" not found in PhpstormProjectsmanagementbootstrapapp.php on line 14
Call Stack:
0.0004 395600 1. {main}() PhpstormProjectsmanagementartisan:0
0.0047 501224 2. require_once('PhpstormProjectsmanagementbootstrapapp.php') PhpstormProjectsmanagementartisan:20
I have tried every solution i know of and it didn’t work. so if someone with more knowledge could help me i would appreciate that.
I tried various solutions like
Reset GitHub login when using composer install
https://laracasts.com/discuss/channels/spark/cannot-update-or-install-spark
and manually filling in the auth for spark doesn’t work since i can’t type in the password when asked in the terminal
Can I use two different php versions to generate a web page? [closed]
I use the CMS dokuwiki to display contents, some of these contents being created by php scripts written in php 5.4. At the moment, I’m using an old version of dokuwiki also running with php 5.4. But to use some new functionalities and security fixes of dokuwiki, I must update it to a newer version running with php 7 or 8. It is possible to have dokuwiki with php 7 or 8 displaying pages created with php 5.4. Rewriting these 5.4 scripts is not an option.
The web server is apache with cgi. It already accommodates several php versions but for different urls.
Problem in updating data using PHP prepared statements [duplicate]
I am trying to update data in the database using PHP prepared statements, but there is an error that I cannot resolve. This error appears in the first line of the code and the error message isWarning: mysqli::prepare(): Couldn't fetch mysqli in C:wamp64wwwnewjornalentryedit.php on line 266
and the line 266 is $stmt = $con->prepare("UPDATE jentress_erp SET date=?, description=?, position=?WHERE token_serial =? AND company=?");
: Prepare failed. I couldn’t solve it despite making many changes and modifications to the code, and all attempts have failed. Please review the code and correct it , All variables in the query statement are correct, defined, and have values, and all column names in the query statement actually exist in the jentress_erp
table. The connection to the database is also working well in the page.
php code:
$stmt = $con->prepare("UPDATE jentress_erp
SET date=?, description=?, position=?
WHERE token_serial =? AND company=?");
$stmt->bind_param("sssss", $test_date, $descrip, $_path, $get_data, $company);
$stmt->execute();
$stmt->close();