Hello.
This is a part of my script:
<table id="table-5">
<thead>
<th>ID</th>
<th>URL</th>
<th>Editor</th>
<td>More....</td>
</thead>
<tbody>
<?php
include('connection.php');
try {
$sql = "SELECT * FROM Data ORDER BY ID DESC";
$result = $conn->query($sql);
foreach($result as $key => $row) {
echo "<tr>";
echo "<td>" . $row['ID'] . "</td>";
echo "<td>" . $row['URL'] . "</td>";
echo "<td>" . $row['Editor'] . "</td>";
echo "<td><a id='more' href='http://www.niloofar3D.ir' onClick='return popup(this, 'mypopup')'><button>»</button></a></td>";
echo "</tr>";
}
} catch(PDOException $e) {
echo "Query error:".$sql . "<br>" . $e->getMessage();
}
$conn = null;
?>
</tbody>
</table>
Line 22 is a button that is popup. But as I have put it here in the php part of the code, it doesn't work now. It acts as clicking a link right now.
But will act as a popup in this way:
<td><a id="more" href="http://www.niloofar3D.ir" onClick="return popup(this, 'mypopup')"><button>»</button></a></td>
How can i fix it. Because of "
and '
this problem has happend.