Extract data from XML and insert into MySQL database using PHP

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025
  • If source code is note visible, you can download in txt file here: pasted.co/383fa258
  • เกม

ความคิดเห็น • 35

  • @sebastiangodirio7350
    @sebastiangodirio7350 4 ปีที่แล้ว +1

    Excelent info friend! Thank you so much.

  • @ginasalgado-1204
    @ginasalgado-1204 10 ปีที่แล้ว +2

    I have a question. I am using a server at bluehost and I will be creating mysql database on my server. I am also going to be using data in XML format to populate my database. After I create this php document to extract from XML & insert into MySQL where do I save the xml_extract.php file on my server?

    • @wilxamtv
      @wilxamtv  10 ปีที่แล้ว +1

      Create new folder at server and save there. For example, new folders name is xml, save here, and execute file->, www.example.com/xml/xml_extract.php

    • @wilxamtv
      @wilxamtv  10 ปีที่แล้ว +1

      WilxamTv example.com, is name of your domain, xml-new folder, xml_extract.php, php file that extract data from xml and insert into your database

  • @beaztsnipr
    @beaztsnipr 9 ปีที่แล้ว +1

    Im getting an ERROR Trying to get property of non-object and another ERROR Invalid argument supplied for foreach() both on line 16. PLEASE HELP hers the code *foreach ($xml -> item as $row)

  • @alternative1950
    @alternative1950 8 ปีที่แล้ว +1

    how to create this xml web format? so that i have url to use.

  • @uditagrawal3821
    @uditagrawal3821 8 ปีที่แล้ว

    it's not working for my xml file.
    hear is the xml file
    AGB
    Movies

    AGB
    Movies

  • @sarakielrayco3327
    @sarakielrayco3327 10 ปีที่แล้ว +1

    I have an error n my xml_extract.php
    Notice: Trying to get property of non-object in C:\xampp\htdocs\syllabus\xml_extract.php on line 15
    Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\syllabus\xml_extract.php on line 15
    what should I do with this

  • @philipedesouzasantos1201
    @philipedesouzasantos1201 7 ปีที่แล้ว +1

    the link is down, can u reupload?

  • @clawlan
    @clawlan 9 ปีที่แล้ว +1

    I am also getting "Notice: Trying to get property of non-object" error. What is the fix for this?

    • @clawlan
      @clawlan 9 ปีที่แล้ว +1

      I think the problem might be that the XML is failing to load?

  • @IsuruDissanayake
    @IsuruDissanayake 9 ปีที่แล้ว +1

    How I find the xml file?

  • @OpalShade
    @OpalShade 8 ปีที่แล้ว

    This is looking good. How do I need to change this to work with OAuth? So far I managed to fetch a protected xml resource. Is it even possible to process this response with your script? If you are willing to help I can provide you with the code I got so far.

  • @wasifzaman6825
    @wasifzaman6825 6 ปีที่แล้ว

    Did you tell me that how to extract xml file in java and send to database

  • @itzuzi
    @itzuzi 8 ปีที่แล้ว

    i need the code because it is not visible in the video clearly.

  • @abhinabacharyya7279
    @abhinabacharyya7279 10 ปีที่แล้ว +1

    simple_xml_extract funtion.... is throwing an error??? how to resolve it

    • @wilxamtv
      @wilxamtv  10 ปีที่แล้ว

      that is from my video? in what minute?

  • @raphaelramos4016
    @raphaelramos4016 6 ปีที่แล้ว

    but did no upload of all data in xml. Note who show erro all time request (30s)

  • @SouravChauhan
    @SouravChauhan 8 ปีที่แล้ว

    i get this error
    Fatal error: Call to undefined function curl_init() in D:\programs1\XAMP\xampp\htdocs\test_xml\index.php on line 4

  • @tobie_eniafe
    @tobie_eniafe 8 ปีที่แล้ว

    nice video . how about form php to xml. That is data from a php file into an xml file

  • @EngineerOnWork2024
    @EngineerOnWork2024 6 ปีที่แล้ว

    How to Work with Multi Dimensional Array in php

  • @balajis.k8714
    @balajis.k8714 7 ปีที่แล้ว

    i'm not having url ?having xml as file how to do?

    • @pra8072
      @pra8072 6 ปีที่แล้ว +1

      simplexml_load_file('abc.xml')

  • @mo_oc7142
    @mo_oc7142 6 ปีที่แล้ว

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\Web__Services\earthquake.php:19 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Web__Services\earthquake.php on line 19
    why the duck is it showing me this

  • @notgenius5767
    @notgenius5767 9 ปีที่แล้ว

    I get error "Parse error: syntax error, unexpected '"' on line 23 in .php when write
    $sql = "INSERT INTO 'test_xml' ('title', 'destination', 'price')"
    "VALUES ('$title', '$destination', '$price')";
    then I fix it
    $sql = "INSERT INTO 'test_xml' ('title', 'destination', 'price')
    VALUES ('$title', '$destination', '$price')";
    but now I get MYSQL Error.
    Why can't connect on mysql? Login without password.
    Thank you

    • @wilxamtv
      @wilxamtv  9 ปีที่แล้ว

      Not Genius you can't connect to your database? You use xampp? or another server?

    • @notgenius5767
      @notgenius5767 9 ปีที่แล้ว

      WilxamTv yes I use xampp.

    • @notgenius5767
      @notgenius5767 9 ปีที่แล้ว

      WilxamTv It works with code bellow.
      $sql = "INSERT INTO test_xml (title, destination, price)
      VALUES ('$title', '$destiantion', '$price')";

    • @RanjithGowda_
      @RanjithGowda_ 9 ปีที่แล้ว

      Not Genius try writing test_xml in between back quotes( ` ) i.e `test_xml` or without specifying any quotes at the ends. In the code specified above, test_xml is written between apostrophes.

  • @AlexanderTomlins
    @AlexanderTomlins 9 ปีที่แล้ว

    Yes this does work :)

  • @locoadams
    @locoadams 9 ปีที่แล้ว

    Where is the script?

  • @Suizen_Mlbb
    @Suizen_Mlbb 9 ปีที่แล้ว

    error miss

  • @SasukeUchiha-qh9zm
    @SasukeUchiha-qh9zm 8 ปีที่แล้ว

    Thanks +WilxamTv, #php_extract