从PHP网页检索用户信息到VB.NET表单 [英] Retrieve users info from PHP webpage to VB.NET form

查看:71
本文介绍了从PHP网页检索用户信息到VB.NET表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我拥有这个php代码





Hi all i have i have this php code


<?php

$app=mysql_connect ("localhost", "dbuser","dbpass") or die('Cannot connect to the database ' . mysql_error());
mysql_select_db ("database");

$user = $_GET["username"];
$pass = $_GET['password'];
$mail = $_GET['email'];
$cell = $_GET['phone'];
$start = $_GET['register'];
$end = $_GET['expire'];

$query  = "SELECT username, password, email, phone, register, expire FROM user WHERE username='$user' GROUP BY username asc";
$result = mysql_query($query,$app);
$row = mysql_fetch_row($result);
echo $row[0] . '<br />' .
$row[1] . '<br />' .
$row[2] . '<br />' .
$row[3] . '<br />' .
$row[4] . '<br />' .
$row[5] . '<br />' .
$row[6] . '<br />' .
mysql_close($app);

?>







如果我按照链接






if i follow the link

("http://example.com/account.php?username=" & TextBox1.Text)





能够在浏览器的空白页面上看到用户详细信息

我在浏览器上看到的相同信息我想让它显示在vb.net中表格





数据库结构

http://i.imgur .com / 3GnYZFl.png



表格示例

http:// i .imgur.com / jISC9J3.png



有没有人有这个功能的vb.net代码



我尝试过:





im able to see the users details on a blank page in the browser
the same information i see on the browser i want it to get displayed in the vb.net form


the database structure
http://i.imgur.com/3GnYZFl.png

example of the form
http://i.imgur.com/jISC9J3.png

does anyone have vb.net code for this function

What I have tried:

<?php

$app=mysql_connect ("localhost", "dbuser","dbpass") or die('Cannot connect to the database ' . mysql_error());
mysql_select_db ("database");

$user = $_GET["username"];
$pass = $_GET['password'];
$mail = $_GET['email'];
$cell = $_GET['phone'];
$start = $_GET['register'];
$end = $_GET['expire'];

$query  = "SELECT username, password, email, phone, register, expire FROM user WHERE username='$user' GROUP BY username asc";
$result = mysql_query($query,$app);
$row = mysql_fetch_row($result);
echo $row[0] . '<br />' .
$row[1] . '<br />' .
$row[2] . '<br />' .
$row[3] . '<br />' .
$row[4] . '<br />' .
$row[5] . '<br />' .
$row[6] . '<br />' .
mysql_close($app);

?>







如果我按照链接






if i follow the link

("http://example.com/account.php?username=" & TextBox1.Text)





能够在浏览器的空白页面上看到用户详细信息

我在浏览器上看到的相同信息我想让它显示在vb.net中表格





数据库结构

http://i.imgur .com / 3GnYZFl.png



表格示例

http:// i .imgur.com / jISC9J3.png

推荐答案

app = mysql_connect( localhost dbuser dbpass或 die(' 无法连接到数据库'。 mysql_error());
mysql_select_db( database);

app=mysql_connect ("localhost", "dbuser","dbpass") or die('Cannot connect to the database ' . mysql_error()); mysql_select_db ("database");


user =
user =


_GET [ username];
_GET["username"];


这篇关于从PHP网页检索用户信息到VB.NET表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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