MySQL Forums
Forum List  »  PHP

Re: Make database table editable
Posted by: Barry Galbraith
Date: March 06, 2017 08:10PM

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.

Options: ReplyQuote


Subject
Written By
Posted
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.