Results 1 to 11 of 11

Thread: Very VERY Urgent... Get data from a PHP file!

  1. #1

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718

    Very VERY Urgent... Get data from a PHP file!

    Hey all.

    Been a while since i've been here, but I desperately need some help.

    I'm trying to pull data from a PHP file, which in turn pulls data from a MySQL database.

    So when the user clicks Command1 for instance, it runs www.myserver.com/getdata.php and pulls in each variable into text form which can be formatted and displayed in the form.

    I was originally going to pull the data straight from the MySQL database, but I doubt they're are enough hosts stupid enough to leave MySQL open for external access, hence why i'm doing it this way!

    Detailed:

    If getdata.php parses:

    $username
    $password
    $date

    The form would pull in each variable and put it in it's own variable which can be displayed in the application.

    I'm dabbling with Inet controls, and i've managed to pull data from a text file from the web but parsing seperate variables is too confusing in this heat :P LOL

    Any help would be very much appreciated.

    Cheers

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    879
    WHAT?!?!?!?

    What you said is a bunch of mumbojumbo to me :P. LOL, you're not even using the correct technical terms. Be specific! In addition, "Pull In" can mean so many different things to so many different people. Please don't use the words "Pull In" :P!
    Visual Basic 6.0
    Visual C++ 5
    Delphi 5


  3. #3
    Lively Member
    Join Date
    Feb 2003
    Location
    EGYPT
    Posts
    103
    I searched for an answer for this question too long , and i didn't found ..

    UP

  4. #4
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959
    Save the info(via PHP) to an XML file then parse the XML using DOM or SAX.

  5. #5

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    Originally posted by VIP3R
    WHAT?!?!?!?

    What you said is a bunch of mumbojumbo to me :P. LOL, you're not even using the correct technical terms. Be specific! In addition, "Pull In" can mean so many different things to so many different people. Please don't use the words "Pull In" :P!
    OK... thats helpful

    Jmacp...

    That sounds interesting! Any idea's on code? References?

  6. #6
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959
    Here's a link for MYSQL to XML.

    http://www.kirupa.com/web/mysql_xml_php.htm

  7. #7
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Just use a web browser control and then go into the body of the html to get the values.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  8. #8

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    Thanx for the info peeps...

    I'm looking into the above link, and i'll try and find some tuts on connecting to an XML file in VB

    Thanks again.

  9. #9

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    I've tried that code from the link above and it just errors constantly saying Data not found, and cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later!!!

    bloody XML! :P

    Anyone got any idea's?

  10. #10
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959
    Can you upload the mysql db, or just create a new db with a few entries?

  11. #11

    Thread Starter
    Fanatic Member VisionIT's Avatar
    Join Date
    Nov 2002
    Location
    Workin'...
    Posts
    718
    Right!

    I've sorted the XML as far as it now shows all the tables in the MySQL database and it now needs to be adapted to show rows in tables instead, which i'll do later.

    The only thing left is the VB code to connect to the php script, and how I would pass each field into it's own variable.

    Looking good so far, and I should be finished by this evening

    Cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width