Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a PHP hooked up to my MYSQL Database, it gets data from the database . What I want to do using VB.Net is get that data from the PHP page, then enter it as a string in VB.Net.
1. Go to PHP Page and get data
2. Post data into VB.NET Strings


The php page is formatted like..

EI
FNAME
MI
LNAME
Job
Salary


PHP
<?php
include 'conf.php';
    $result = mysql_query("SELECT * FROM sales");
    while($row = mysql_fetch_array($result)){

                  echo $row['s_number'] ;
                  echo $row['product_name'];
                  echo $row['goods_number'];
                  echo $row['sold_date'] ;
                  echo $row['time_sold'];
                  echo $row['customer_name'];
                  echo $row['customer_addr'] ;
                  echo $row['moved_status'];
                  echo $row['report'];
                    echo $row['update_note'] ;

                }
?>
Posted
Updated 26-Feb-15 4:16am
v2
Comments
ZurdoDev 26-Feb-15 10:19am    
Didn't you already ask this? Use the WebClient class. Lots of examples online.
ZurdoDev 26-Feb-15 10:26am    
I'm not sure what you mean. The suggestion I have given is correct and will work. Are you expecting someone to do all the work for you? That won't happen.

1 solution

You could also use a WebBrowser and the method GetElementByID. See here for more references.

Or as suggested above, the WebClient with DownloadString method. Find more here.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900