zrobiłem to tak:
<?
include('config.php');
$query = query('users', "`login` = '".$_SESSION['login']."'");
$row = mfa($query);
show('
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function getXMLHttpRequestObject(){
try{
return new XMLHttpRequest();
}
catch(e){
try{
return new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
return false;
}
}
}
function zapisz(){
var XMLHttpRequestObject = getXMLHttpRequestObject();
if(XMLHttpRequestObject){
var th = document.getElementById("idedit");
var mail = document.getElementById("mail").value;
mail = escape(mail);
var url = "'.$URL.'/edit_data_true.php?action=" + mail;
XMLHttpRequestObject.open("GET", url);
XMLHttpRequestObject.onreadystatechange = function(){
if(XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200){
th.innerHTML = XMLHttpRequestObject.responseText;
delete XMLHttpRequestObject;
XMLHttpRequestObject = false
}
}
XMLHttpRequestObject.send(null)
}
}
</script>
</head>
<form action="" method="post" name="form">
<table class="user_panel">
<tr>
<th class="header" colspan="2">'.EDIT_DATA.'</th>
</tr>
<tr>
<th>'.LOGIN.':</th>
<th><input type="text" value="'.$row[1].'" disabled class="form_edit"></th>
</tr>
<tr>
<th><input type="text" value="'.$row[3].'" name="mail" class="form_edit" id="mail"></th>
</tr>
<tr>
<th>'.NAME.':</th>
<th><input type="text" value="'.$row['imiona'].'" name="name" class="form_edit"></th>
</tr>
<tr>
<th>'.SURNAME.':</th>
<th><input type="text" value="'.$row['nazwisko'].'" name="surname" class="form_edit"></th>
</tr>
<tr>
<th>'.ADDRESS.':</th>
<th><input type="text" value="'.$row['adres'].'" name="address" class="form_edit"></th>
</tr>
<tr>
<th>'.COUNTRY.':</th>
<th><input type="text" value="'.$row['kraj'].'" name="address" class="form_edit"></th>
</tr>
<tr>
<th>'.CITY.':</th>
<th><input type="text" value="'.$row['miasto'].'" name="address" class="form_edit"></th>
</tr>
<tr>
<th>'.POSTAL.':</th>
<th><input type="text" value="'.$row['kodpocztowy'].'" name="address" class="form_edit"></th>
</tr>
<tr>
<th>'.DATE_BIRTH.':</th>
<th><select name="year">');
$birth = explode('.', $row['dataurodzenia']); $rok2 = $rok - 70;
for($i = $rok2; $i < $rok; $i++){
if($birth[0] == $i){
show('<option value="'.$i.'" selected>'.$i.'</option>');
}
else{
show('<option value="'.$i.'">'.$i.'</option>');
}
}
$month = array('Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'); show('</select><select name="month">');
for($i = 0; $i < 12; $i++){
$ii = $i+1;
if($birth[1] == $ii){
show('<option value="'.$ii.'" selected>'.$month[$i].'</option>');
}
else{
show('<option value="'.$ii.'">'.$month[$i].'</option>');
}
}
show('</select><select name="day">');
for($i = 0; $i < 31; $i++){
$ii = $i+1;
if($birth[2] == $ii){
show('<option value="'.$ii.'" selected>'.$ii.'</option>');
}
else{
show('<option value="'.$ii.'">'.$ii.'</option>');
}
}
show('</select></th>
</tr>
<tr>
<th colspan="2"><input type="button" onclick="zapisz();" value="Zapisz"></th>
</tr>
<tr>
<th id="idedit"></th>
</tr>
</table>
</form>
</html>');
if($_GET['action'] == 'edit'){
}
?>
i w pliku edit_data_true.php mam
<?php
echo $_GET['action'], 'ok'; ?>
i jak klikam 'zapisz to nic nie wyswietla na stronie'
blad nie lezy w przeslaniu danych tylko w wykonaniu skryptu ktory jest w edit_data_true.php poniewaz tam jest echo i jak klikne na zapisz to nic sie nie zmienia na stronie