Hello, I am sending a value to a php file via the $_POST function and I am receiving an error
When I use the $_Get function it works fine
But the problem is when changing to the $_POST function
Although he was working a while ago
This is a test page for that
Thank you all
I tried a lot of solutions and it didn't work for me
The result with the $_GET function
Result with $_POST function
When I use the $_Get function it works fine
But the problem is when changing to the $_POST function
Although he was working a while ago
This is a test page for that
Thank you all
I tried a lot of solutions and it didn't work for me
b4a:
Private Sub SwiftButton1_Click
Dim resJob As String
Dim server As String="https://www.alfaiz678.com/test.php"
Dim JobX As HttpJob
JobX.Initialize("JobX", Me)
JobX.PostString(server, _
"action=B4X Simple, powerful and moderndevelopment tools." )
'
' JobX.Download2(server, _
' Array As String ("action","B4X Simple, powerful and moderndevelopment tools." ))
JobX.GetRequest.Timeout=15000
Wait For (JobX) JobDone(j As HttpJob)
If j.Success Then
resJob = J.GetString
Log("Response from server: " & resJob)
'xui.MsgboxAsync(resJob,"")
End If
j.Release
End Sub
php:
<?php
//if(isset($_GET['action']))
if(isset($_POST['action']))
{
// $action = $_GET['action'];
$action = $_POST['action'];
echo $action;
}
else
{
echo "Index is empty";
}
?>
The result with the $_GET function
B4X:
Response from server: B4X Simple, powerful and moderndevelopment tools.
Result with $_POST function
b4a:
Response from server: Index is empty