I am new to php. I want to change the content of a div on click of a button which can be set to any other text.
<div id="container">
<b>Dear ABC,</b>
<p>Thank You for an order. Your order #" .$row['ordNum']."</p>
<table>
<tbody>
<tr>
<th>ord_id</th>
</tr>
<tr>
<td>.$row['order_id']."</td>
</tr>
</table>
<p>Thank You</p>
</div>
<input type="Button" value="change"/>
I want the user to update the message content above on button click. The order is not coming from db.
How will I allow the user to edit all of the text data except orderId
?
you can request the content at a file in the same directory called xyz.php
with jquery
$.ajax({
url: 'xyz.php',
type: 'GET',
success: function(data){
$('#container').html(data)
}
})
the php file outputs some text
<?php
echo "<strong>yo</strong>";
maybe you get an idea