2

I have a PHP script which accepts an argument and adds record in the mySQL database if its not available and if its already available it gives a message 'Record already found'.

How can i read this message from vb.net and do appropriate action such as

if data_is_in_db then msgbos("your record already found in the database")

if data_is_not_in_db then msgbox("your record has been added in the database")

Please help me for this, as i am a newbie.

Thanks

2 Answers 2

1

It would be simpler to integrate a database connection inside your VB.NET application instead of trying to communicate with a PHP script. Just my two cents.

Sign up to request clarification or add additional context in comments.

Comments

0

You can (amongst many other possibilities) use the http status message for that.

E.g send a 201 Created when the record has been added and a 409 Conflict if the record is already there.

see also:
void header ( string $string [, bool $replace = true [, int $http_response_code ]] )
HttpWebResponse.StatusCode Property

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.