right now I am using this to read from my database
code:
<?php
$db = mysql_connect("host", "username", "pass");
mysql_select_db("links", $db);
function links_display () {
global $db;
$sql = "select * from links order by name";
$result = mysql_query($sql, $db);
if($myrow = mysql_fetch_array($result)) {
echo "<p>";
do {
printf("<a href=\"%s\">%s</a> - %s<br>\r\n", $myrow["url"], $myrow["name"], $myrow["description"]);
} while ($myrow = mysql_fetch_array($result));
echo "</p>";
}
else {
echo "<p>No links found!</p>";
}
}
function links_edit() {
//for now
links_display();
}
?>
On my links page it calls links_display(). On my page to edit/delete links (in a directory protected by .htpasswd) i call links_edit(). How should I edit the links? I don't want to use links ( $PHP_SELF . "?id=somenumber" ) because I thought that was insecure even if I use urlencode(). Is the best method to use a form with post? I couldn't figure out how to implement it.
If you don't have a sample, I think I can figure it out if you give me a little direction.
evilclown01