Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~303 People Reached
Favorite Forums
Favorite Tags
php x 3
Member Avatar for 7akimz

this is my html code [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php $xml = simplexml_load_file('../order1.xml'); $products = $xml->xpath('/products/laptop'); foreach($products as $laptop) { if($_POST['list'] == $laptop->name) { global $lname,$detail,$price; $lname = $laptop->name; $detail = $laptop->details; $price = $laptop->price; } } ?> <meta name="delete" content="deleting products" /> …

Member Avatar for 7akimz
0
162
Member Avatar for 7akimz

this is my php code [CODE]extract($_POST); $doc = new DOMDocument; $doc->load('../order1.xml'); $laptops = $doc->documentElement; foreach($laptops as $laptop){ if($list==$laptop->name) { $name1 = $laptop->name; $oldnam = $laptop->removeChild($name1); $olddetails=$laptop->removeChild($laptop->details); $oldprice=$laptops->removeChild($laptop->price); $name1 = $laptops->getElementsByTagName('name')->item(0); $oldname = $laptops->removeChild($name1); }} $doc->save("../order2.xml");[/CODE] this is my xml [CODE]<?xml version="1.0"?> <?xml-stylesheet type = "text/xsl" href = "input.xsl"?> <products> <laptop> …

Member Avatar for Atli
0
141