, ..

:
. , . php , , :

Code:
<?php
if(isset($_POST['setON'])) {setON();}
if(isset($_POST['setON'])) {setOFF();}

function setON()
{
$dom = new DOMDocument();
$dom->load('DL385.xml');
$xpath = new DOMXPath($dom);

$UIDs = $xpath->query('server/UID');
foreach($UIDs as $UID)
{
        $a          = $UID->nodeValue; // shortcut
		$new_value = 'ON';
        $UID->nodeValue = "{$new_value}";
}

$dom->save('DL385.xml');
}

function setOFF()
{
$dom1 = new DOMDocument();
$dom1->load('DL385.xml');
$xpath1 = new DOMXPath($dom1);

$UIDs1 = $xpath1->query('server/UID');
foreach($UIDs1 as $UID1)
{
        $a1          = $UID->nodeValue; // shortcut
		$new_value1 = 'OFF';
        $UID1->nodeValue = "{$new_value1}";
}

$dom1->save('DL385.xml');
}


?>
, , php :
Code:
<form method="POST">
<center>
<br>
<input name="setON" value="Turn Unit ID On" onclick="return areYouSure( this );" type="submit">
<input name="setOFF" value="Turn Unit ID Off" onclick="return areYouSure( this );" type="submit">
</center>
</form>
, .. , DOM xml - , .. ?!?

,


---------- 21:46 ---------- 21:09 ----------

.. , : , .. ..

?

---------- 21:54 ---------- 21:46 ----------

- .. :
Code:
header("Location: file.php");
...