将数据从vb.net发送到php,反之亦然 [英] send data from vb.net to php and vice versa

查看:100
本文介绍了将数据从vb.net发送到php,反之亦然的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi code project member,

我有一个代码,可以将数据从vb.net发送到PHP。但是从vb.net获取数据后,它将更新数据库mysql。我的问题是在mysql更新后,如何告诉vb.net我已经更新了我的数据库..



这是我的代码。



activate.php

hi code project member,
i have a code that send data from vb.net to PHP. but after get the data from vb.net,it will update database mysql. the problem i have is after update in mysql,how to tell the vb.net that i had updated my database..

here is my code.

activate.php

<?php
$serialnum = $_GET['ser'];
$company_name = $_GET['comp'];
$date_activate = date("Y-m-d");

$check = mysql_query("SELECT * FROM license WHERE serialnumber = '$serialnum' && status = 'DEACTIVATED'");

if($check)
{
	if(mysql_num_rows($check) == 1)
	{
	//if exist in table license,update column status = 'activate' and date_activate = now(), check again in table activate
	//check in table activate
	//if exist,means it already activate
        //if not exist,insert into table activate and
        //the problem is here how to tell vb.net that i already update database
	}
	else
	{
	//the problem is here to,how to tell vb.net that data is exist 
	
	}
}
else
{
//the problem is here to,how to tell vb.net that query failed
}
?>



这是我在vb.net中的脚本



activatefrm.vb


this is my script in vb.net

activatefrm.vb

Private Sub activateBtn_Click(sender As Object, e As EventArgs) Handles activateBtn.Click
        Process.Start("http://localhost/license/activate.php?ser=" & serialnum.Text & "&&comp=" & compname.Text)   
    End Sub



i希望codeproject成员可以帮助我。谢谢。


i hope codeproject member can help me. thank you.

推荐答案

serialnum =
serialnum =


_GET [' ser'];
_GET['ser'];


company_name =
company_name =


这篇关于将数据从vb.net发送到php,反之亦然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆