Hi all,
I'm very new to php mysql but have been learning from
http://www.freewebmasterhelp.com/tutorials/phpmysql/1
I have set up a web page and my home page (the one that displays what is in my database) works nicely; however, my edit page does not work unless I specify the exact id number I want to edit. Even though there's currently only one row in my database, if I have:
PHP Code:
$query="SELECT * FROM home WHERE id='$id'";
on my edit page, the page doesn't display; however, if I do:
PHP Code:
$query="SELECT * FROM home WHERE id='1'";
It works. The page I'm working on
http://www.katherinewagnerdesigns.co...ford/index.php is set up with two "posts". One titled "Movies in the Park," the other "Annual Flea Market and Crafts Fair." Since I just started learning php mysql, only the first post uses php (the second one html for now). The edit page,
http://www.katherinewagnerdesigns.co...lford/edit.php right now is set up with id=1 but I would like to have it so the edit page has every post on it, with the ability to add new posts and edit/delete old ones. So, it seems that this problem I'm having will stop me from being able to do this unless I can get it to work and auto-increment down the page each successive id post.
I hope this makes sense to everyone...sorry I'm still learning this. Thanks for any help anyone can give me. Matt