我是PHP的绝对初学者。在我的Wordpress页面中,我需要:
ajax_select_city_js__
)onclick
方法,但我
不能这样做(按钮值等于UPDATE部分)。因为我想发帖时出错,我把所有内容放入follow image。
Wordpress主页:
[php] include '/select_list_city.php'; [/iphp]
<html>
<head>
<meta charset="utf-8" /><script src="/ajax_select_city.js" type="text/javascript"></script>
</head>
<body>
<form id="myForm" action="/userlnfo-modify.php" method="post">
Név*:<br><input type="text" name="nev">
<p> [php] echo $re_html;[/php]<br class="clear" />
<br class="clear" />
<button id="sub">Search</button>
<br><br></form><span id="result"></span>
<div id="data"><?php echo $result; ?></div>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js"></script>
<script src="/my_script.js" type="text/javascript"></script>
</Form>
</body>
</html>
这是userlnfo-modify.php
:
while ($data = mysqli_fetch_array($query))
{
$ID = $ID+1;
$data_name = $data["name"];
echo'
<tr style="background-color:#EFFBFB; border: 1px solid black;">
<td style="font-size:14px;">'.$data["name"].'</td>
<td style="font-size:14px;">'.$data["city"].'</td>
<td style="font-size:14px;">'.$data["age"].'</td>
<td style="font-size:14px;">'.$data["utca"].'</td>
<td><input type="text" value='.$data["mobil"].'></td>
<td><input type="text" value='.$data["email"].'></td>
<td onclick="cellOnclick()"><a href="#" onclick="linkOnclick()" style="text-decoration: none;">
<input type=button value="UPDATE" myFunction(this);return false;"></button></td></tr>';
}
echo '</table>';
}
unset all variable...