Hello , everyone !

I have a question about XML & MySQL . So .. First , what I want to do : I have a Excel file ( .xml saved ) and I want to create a script that insert the XML file in MYSQL Database without any CPanel Acces . After this I want to show this from MySQL to a page that is called discounts.php . My question is how can i do the first part , the insertion of the .xml file to the mySQL.

Thank you in advance , Andrei !

You have a couple of classes in PHP to read XML. An example is SimpleXML. Here's a W3Schools tutorial for that class. With it you can iterate through an XML file and while you do that, you can, for example, create a new array which you then traverse later on to insert the records into your database, or you can just insert the records into your database right away.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.