Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql_connect($sdd_db_host,$sdd_db_user,$sdd_db_pass) or die(mysql_error());
- mysql_select_db($sdd_db_name) or die(mysql_error());
- echo "posle soska";
- $xmlURL = "1.xml";
- $sxml = simplexml_load_file($xmlURL);
- var_dump($xml->children());
- echo "what is it";
- //foreach($sxml-> goods as $good){
- foreach($sxml->children()as $good){
- echo "after cicle";
- $sh = stripslashes($good->attributes()['sh']);
- $name = stripslashes($good->attributes()['name']);
- $ed = stripslashes($good->attributes()['ed']);
- $cost = stripslashes($good->attributes()['cost']);
- var_dump ($goods);
- $sql = ("INSERT INTO Place (sh,name, ed, cost) VALUES('$sh','$name', '$ed', '$cost')");
- result = mysql_query($sql) or die("Error ".mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement