|
-
Nov 9th, 2006, 03:29 PM
#1
Thread Starter
Frenzied Member
Updated a record
Thanks for your help everyone...
Right now, i have it where on one page, you click the ID, and it takes you to an "Update" Page.
I wanted it to take the ID that was clicked on the other page, and pass it into the db query script, and bring back its values, i have that done.
My problem is, i wanted it to put the queryed values into text box's so that the user can edit them, and then hit "update" and it will update that record in the DB.
I cant seem to get the values from my query into text box's
PHP Code:
<?php $pasc_id = $_REQUEST['pasc_id'] ?>
<?
$request = "SELECT DISTINCT pasc_id,part_number,return_po,date_entered,part_notes FROM dss_returns where pasc_id = '$pasc_id'";
$query = mysql_query($request);
$num = mysql_num_rows($query);
while($data = mysql_fetch_array($query)){
echo '<td><a href="./Update_Part.php?pasc_id=' . $data['pasc_id'] . '">' .' ' . $data['pasc_id'] . '</a>'. '</td>'.'<td>'. $data['part_number'] .'</td>'.'<td>'. $data['return_po']. '</td>' .'<td>'. $data['date_entered']. '</td>' . '<td>' . $data['part_notes'] . '</td></tr>';
echo '<td><a href="./Update_Part.php?pasc_id=' . $data['pasc_id'] . '">' .' ' . $data['pasc_id'] . '</a>'. '</td>';
echo '<form action="Update_Part.php" method="post">';
echo '<input type="text" name="partnumber" size="20" maxlenght="20" value=".<?php $data['part_number'] ?>."/>';
}
?>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|