December 14th, 2013, 05:04 AM
Show data with link
I have following codes
and Edit.php has this data
$sql = "SELECT * from contacts order by name" ;
$select = mysqli_query($con,$sql);
while($row = mysqli_fetch_array($select))
echo "<td> <a href='edit.php?id=".$row['id']."'>
<img border=noborder src=images/pencil.png title=Display></a></td>";
echo "<td align='left'> " . $row["name"]. "</td>";
echo "<td> " . $row["moba"]. "</td>";
echo "<td> " . $row["city"]. "</td>";
echo "<td> " . $row["country"] . "</td>";
I press a link then related data must appear in related textboxes against selected id like shown in image
$query ="SELECT * FROM contacts WHERE id = $sno ";
while ($row = mysqli_fetch_array($result))
echo "no data found";
December 14th, 2013, 05:46 AM
as long as you don't listen to us, this whole thing is pointless. Several people have told you that your code has massive security vulnerabilities. Now it's even worse, because you've added some cross-site scripting vulnerabilities. If you put this code online, the next best script kiddie will "hack" your server and your users (which is even worse) in a matter of minutes.
This is what you need to fix first. As long as your code is fundamentally broken, we cannot have a discussion about fancy features.
So are you willing to fix the problems? Or do you give a damn about what we have to say? In this case, I don't see how we could help you.