Reputation: 440
Normally i use id
to take database values from one page to another. like a example format provided
location.href='edit_form.php?id=<?php echo $id?>
Is this way be problematic?
Is this ok or can i adopt any other way to pass values from one page to another.
which is the best way to achieve this.
Upvotes: 2
Views: 1448
Reputation: 13421
Passing IDs around is simple and it gets the job done. You should expect people to try changing the id to see what happens, but as long as you don't show users pages they shouldn't be able to hit, it sounds great.
While I think the query string is right for what you're doing, there are more options:
Upvotes: 2