it's the 2nd time i post here. Again i'm not too proficient in logic nor PHP, so please bear with my messy codes :)
I have an array of textboxes with value and there are array of buttons next to it. i've managed to display the value of the text box with the corresponding button into a dialog box (thanks to Mr.Barmer from here)
Then i intend to save the specific value from the textbox that i have captured into the database, here i have no clue what i should do. I try to "echo" the value of the textbox by insert it into
($link=((document.getElementById('link$i').value)))
but i got no result.
My question is: what should i add to my codes to retrieve the value from the textbox, when i clicked the corresponding button and save it to database, or simply capture the value and store it in
(ex:$link=$_POST['link'])
then post it using echo $link
?
here's the piece of my PHP codes i'm talking about:
$data = mysql_query("SELECT * from tempimg");
while($hasil = mysql_fetch_array($data)){
$i++;
echo "<tr>
<td align='center'><input type= checkbox name=check[]
value=$hasil[idFoto]</td>
<td align='center'><img src=$hasil[thumbPath]></td>
<td align='center'>$hasil[imgName]</td>
<td align='center'>$hasil[thumbPath]</td>
<td align='center'>$hasil[Path]</td>
<td align='center'>
<label class=text_label> $hasil[imgLink]</label>
<div class=edit></div>
<input type=text align=center value=$hasil[imgLink]
name=link[{$hasil['idFoto']}] id=link$i />
<div class=clear></div>
<td align=center>
<button type=submit =
onClick=\"return confirm('you clicked button $i
with ID: $hasil[idFoto] '+'value: '
+(document.getElementById('link$i').value))\">
<img src=images/sav.png alt=search-btn id=img />
</button>
</td>
<td align=center><img src=images/del.png></img></td>";
}
and here's the SS of the page that i'm working now http://imgur.com/FtKAs8K
just need to get the "70" and the "test.com" value and "echo" it, the rest of database query i'll try to work out myself. So i humbly request help from the people here, please help me. Thank you for your attention