I am creating a simple page in php and fill the datas through xml rendering. I am new to php. My xml file is
data.xml
<painting>
<text1>Welcome</text1>
<text1>Test</text1>
<text1>Look here</text1>
<img_view1>img/myimg1.png</img_view1>
<img_view2>img/myimg2.png</img_view2>
</painting>
I have an html table which contains image and text. My table is
index.php
<table >
<tr>
<td>Name</td>
<td>Image</td>
<td>Type</td>
</tr>
<tr>
<td>Sports</td>
<td>img/sports.png</td>
<td><input type="submit" value="Btn" name = "submit" > </td>
</tr>
<tr>
<td>Tv</td>
<td>img/tv.png</td>
<td><input type="submit" value="Btn" name = "submit" ></td>
</tr>
</table>
And my requirement is when i press the row 1 button , the image present in the particular row needs to get update in img_view1 field of my xml file. All the other values needs to remain the same. When i press 2 nd button that row image needs to be updated in xml file.
I am very new to php and browsed whole day for this updation but cannot find the answer. Help me in achieving this.
No comments:
Post a Comment