By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

not able to retriving values from one page to another page.

P: 10
Hello,
Here is my problem in my first.php program I retrieved values from the database and displayed (each row contails one display and one edit button),when I click on edit button The page should be redirected to second.php and the id of that particular row should be retrived to the second.php page so that based on that id i can delete or upadte the data.
[php]
<html>
<body>
<table width="53%" border="0" cellspacing="5" cellpadding="0" align="left">
<form action="update.php" method='post'>
<?php
include("dbconnect.php");
$res=mysql_query("select * from addemployee ");

echo"<table border='1'>
<tr>
<th>name</th>
<th>platform</th>
<th>designation</th>
<th>id</th>
<th>taddr</th>
<th>paddr</th>
<th>email</th>
<th>idcno</th>
<th>phno</th>
<th> update<th>
</tr>";
while($row=mysql_fetch_array($res))

{

echo "<tr>";
echo "<td>&nbsp;" . $row['name'] . "</td>";
echo "<td>&nbsp;" . $row['platform'] . "</td>";
echo "<td>&nbsp;" . $row['designation'] . "</td>";
echo "<td>&nbsp;" . $row['id'] . "</td>";
echo "<td>&nbsp;" . $row['taddr'] . "</td>";
echo "<td>&nbsp;" . $row['paddr'] . "</td>";
echo "<td>&nbsp;" . $row['email'] . "</td>";
echo "<td>&nbsp;" . $row['idcno'] . "</td>";
echo "<td>&nbsp;" . $row['phno'] . "</td>";
echo " <input type='hidden' value='$row[empid]' name='empid'>";

echo "<td>
<input type='button' name='Edit' value='Edit' onclick= 'self.open("second.php?empid={$row.[$empid]}","",width=400);return false'>
<input type='button' name='Edit' value='Dlete' onclick=window.open('delelte.php')>

</td>";
echo"</tr>";
}
echo "</table>";
?>
</form>
</table>
</body>
</html>[/php]
Read the Posting Guidelines at the top of this forum!!
Especially the part about enclosing shown code within php or code tags!!!

moderator

by this code Im not able to retrive id to second .php page.
please help me.
regards,
ramya
Feb 28 '07 #1
Share this Question
Share on Google+
1 Reply


P: 11
well, you are sending the page to 'update.php' instead of 'second.php'
Feb 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.