Android Question I have two additions that I want to link together

AlfaizDev

Well-Known Member
Licensed User
Longtime User
Hello
I have two additions that I want to link together
Using START TRANSACTION
And COMMIT
How to do that with the Post function
The example below

B4X:
Private Sub InsertSghra
    JobInsertSghra.Initialize("JobInsertSghra",Me)
    JobInsertSghra.PostString("http://www.***.php", _
    " insert into Insert2(NameMuderya,NoaTaleem) VALUES('" & LabelTitleWsta.Text & "','" & EditTextZkoorWsta.Text &"')")
End Sub

Private Sub InsertWsta
    JobInsertWsta.Initialize("JobInsertWsta",Me)
    JobInsertWsta.PostString("http://www.***.php", _
        " insert into Insert2(NameMuderya,NoaTaleem) VALUES('" & LabelTitleWsta2.Text & "','" & EditTextZkoorWsta2.Text &"')")
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
The transaction should be started and commited by the php-script.
Edit your php and do it there.

BTW: It looks like an very bad idea to post a query to php.
Easy job for hackers to infiltrate.
 
Upvote 0

AlfaizDev

Well-Known Member
Licensed User
Longtime User
You mean that all operations of adding, modifying, and so on, are inside the PHP file
It is not in b4a program
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I don´t know what IS inside the PHP.

I just suggest all should be there and not in B4A.

Sending a query over a http-connection is a real wide open door for any hacker.

What if one post a "DELETE * FROM Insert2;" to your server?
 
Last edited:
Upvote 0

AlfaizDev

Well-Known Member
Licensed User
Longtime User
What if one post a "DELETE * FROM Insert2;" to your server?

I did it because the app is private
And your words are correct in the case of the spread of the application
Everything will be hacked easily
So, did you explain to me the example of the other way?
Because the topics about that method are both very old
 
Upvote 0
Top