[UPHPU] Form Help
geekout at gmail.com
Fri Jun 24 09:55:55 MDT 2005
Dave gave a better, and more detailed approach, than mine...use his.
Oh, and his was correct, too. Don't use $_POST if it is in the url,
On 6/24/05, Dave Smith <DavidSmith at byu.net> wrote:
> > What I want to do is when someone clicks on the Edit button (green
> > check mark) it takes them to a page that is prefilled with the
> > information from the "member" that was selected.
> I would just use the query string like so:
> <a href="editmember.php?id=<?php echo $id; ?>"><img src="greencheck.gif"></a>
> Then, in the editmember.php file, just grab the $id value out of the $_GET
> array like so:
> $member_id_to_edit = $_GET['id'];
> // Do the database query here using the $member_id_to_edit
> // ... SELECT * from Name where ID=$id
> Of course, if you don't have ID numbers, then you could use some other
> form of identification.
> I may also humbly recommend that you pick up a PHP/MySQL book to get some
> good ideas for how this sort of thing is usually done.
> Also, you'll need to worry about security since users could do anything to
> that 'id' value in the query string (including write their own SQL code to
> really mess with you). This is where it gets more important to go pick up
> a good book.
> Good luck!
> UPHPU mailing list
> UPHPU at uphpu.org
> IRC: #uphpu on irc.freenode.net
More information about the UPHPU