Re: Make database table editable
The index to elements of array $res[] should be quoted strings, like this.
echo "<td><a href=\"edit.php?id={$res['name']}\">Edit</a> | <a href=\"delete.php?id={$res['ip']}\" onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>";
The array elements also need to be enclosed in braces { } because they (now) contain quotes.
When you have the page in the browser, take a look at the source code of the page, the html, to see that it looks properly formed, particularly around your edit and delete links.
Good luck,
Barry.
Subject
Written By
Posted
February 28, 2017 04:16PM
February 28, 2017 05:33PM
February 28, 2017 08:21PM
Re: Make database table editable
March 06, 2017 08:10PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.