I tried connecting to MySQL database with b4a
Use the OkHttpUtils2 library
This error appears
When I use the HttpUtils2 library
This error appears
These codes are used below
Use the OkHttpUtils2 library
This error appears
B4X:
ResponseError. Reason: Internal Server Error, Response:
When I use the HttpUtils2 library
This error appears
B4X:
(Intent) Intent { cmp=b4a.exampleasd/anywheresoftware.b4a.samples.httputils2.httputils2service }
These codes are used below
B4X:
Sub Button1_Click
jop1.Initialize("at",Me)
jop1.PostString("http://www.mysite.com/insert.php","$num="&EditText1.Text)
End Sub
Sub JobDone(Job As HttpJob)
If Job.Success Then
If Job.JobName ="at" Then
ToastMessageShow("yes",True)
Else
ToastMessageShow("no",True)
End If
End If
B4X:
<?php
$servername = "";
$username = "";
$password = "";
$dbnamee = "";
// Create connection
$conn = mysql_connect($servername,$dbnamee, $username, $password) or di(mysql_error());
mysql_select_db($dbnamee) or di(mysql_error());
?>
B4X:
<?php
incliude ('conn.php');
$num = strip_tags(trim($_post["k"]));
mysql_query("INSERT INTO kkkk (k) VALUES ('$num')");
?>