23 lines
586 B
PHP
23 lines
586 B
PHP
<?php
|
|
// Create a file named test_transfer.php and place it in the same directory as your productlist.php
|
|
|
|
// Set headers for JSON response
|
|
header('Content-Type: application/json');
|
|
|
|
// Log function
|
|
function log_message($msg) {
|
|
file_put_contents('transfer_test.log', date('[Y-m-d H:i:s] ') . $msg . "\n", FILE_APPEND);
|
|
}
|
|
|
|
log_message('Script started');
|
|
log_message('POST data: ' . json_encode($_POST));
|
|
|
|
// Echo back what we received
|
|
echo json_encode([
|
|
'success' => true,
|
|
'message' => 'Test successful',
|
|
'received_data' => $_POST
|
|
]);
|
|
|
|
log_message('Script completed');
|
|
?>
|