Welcome to WebmasterWorld Guest from 54.205.209.95

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Form Row ID

form method post

   
12:26 pm on Jun 9, 2010 (gmt 0)

5+ Year Member



hi,

i'm unable to retrieve value of row id when clicking the submit button. The id was completely empty.
Could some one brief me on these issue?
Thanks



while($row = mysql_fetch_row ($result))
{
echo "<tr>";

// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
echo "<td class='td_rowhd'><font class=tdrow>$cell</font></td>";

echo "<td class='td_rowhd'><form method='POST' action='update.php?id=".$row['id'] . "'>
<input type='submit' value='Update Changes'></td>";

1:33 pm on Jun 9, 2010 (gmt 0)

5+ Year Member



anyone?
2:12 pm on Jun 9, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi there Chrissim,

I am curios as to why you are looping within a loop..

What are you trying to achieve? Because it looks like you want to grab data, edit, then update records according to the id number pulled in the first place...

First place to start is by turning on error_reporting to see what if any errors are being flagged:-

<?php
error_reporting(E_ALL);
//rest of code
.
.

then trace each step as you get the data by echoing and exiting :)

Cheers,
MRb
4:53 am on Jun 10, 2010 (gmt 0)

5+ Year Member



Hey thanks matthew1980, everything working now :)
7:10 am on Jun 10, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi there chrissim,

What'd I do? I assume there was a typo in the mix somewhere?

Cheers,
MRb