Replacing php with Xojo web App

Trying to replace a php program which fill out a form with a web app.

The web app run ok in a browser, posting information enter into PostgreSQL database.

Using a desk top (HTTP) app, made with Xojo I get an error: “Your browser is not supported.”, when linking to the Xojo web app.

If I change the desk top to link to the php it works ok.

Is it possible to link and post with both app being Xojo, if so how?

This can help:

http://documentation.xojo.com/index.php/WebSession.AllowUnsupportedBrowser

Thanks! Works like a champ.

So much to learn - so little memory.

I was a little hasty in my reply.

The connection works.

The post does nothing.
The server logs shows both the GET and POST, but row not added to DB.
Is there something I need to do in the web or DT app to get Xojo post to work?

Ah. You should be using App.HandleSpecialUrl.

Thanks.
Read the docs about App.HandleSpecialUrl. Do not understand any of it. However I added the code to my app. Was not sure about the code for the button, so I added it to the ‘Submit’ button; which is used to show errors or update the data base if no errors with a ok message. Did not show my error message, just showed the message from the coded added.

I’m at a loss. Now what? Back to php…

It sounds like you are trying to directly call a page on a Xojo web app from a desktop app. You cannot do that.

You can have a web app accept HTTP post requests (using WebApplication.HandleSpecialURL) and then process the request as necessary (updating the DB it sounds like).

It sounds to me like you need to split out the code in the web app that is updating the DB to its own method that connects to the DB and updates it. On the web page in your web app, you’d get the necessary info from the page fields and call the method to update the DB. For desktop requests, you would put code in the WebApplication.HandleSpecialURL to get the necessary info supplied in the WebRequest and call the method to update the DB.

There are two examples included with Xojo that show you how WebApplication.HandleSpecialURL works. The easiest one to check out is the one here: Web/QuoteService-SpecialURL

The more advanced one is: Communication/Internet/TwilioAnswerCall

[quote=26737:@Paul Lefebvre]
Paul Lefebvre
2 hours ago Xojo Inc

It sounds like you are trying to directly call a page on a Xojo web app from a desktop app. You cannot do that.[/quote]

Paul: To make sure; are you saying: that a Xojo desktop app can NOT link using a SOCKET, via the internet, to a Xojo web application with a POST?

[quote=26764:@James A Smith]Paul: To make sure; are you saying: that a Xojo desktop app can NOT link using a SOCKET, via the internet, to a Xojo web application with a POST?
[/quote]

He’s not saying that. I think you’re talking at different levels. A WE app is basically a web server. When you connect to its “home page”, you get all the GUI and Session stuff that WE apps primarily deliver. WE apps can also serve up “special” URLs that mimic a more traditional web serving experience. For your particular problem, you could implement one of these in a WE app to do what you need it to do. POST or GET for passing script data both work fine.