jones53084 Posted November 30, 2006 Share Posted November 30, 2006 Hi all,I am writing a contact management php page. In the page I use mysql_fetch_array() to show the search results. If the user searchs by first name, there are times when multiple entries come up. Once the data is displayed on the screen the user has the option to edit, or delete this entry in the database. So on this one screen it shows all the search results. If the user clicks on edit or delete, I then create a $_SESSION variable to bring this information to the edit or delete page. However this variable only gets created for the first entry when I do the mysql_fetch_array(). If I choose any entry after the first, it brings over the first entries information. How would I create a variable to bring this over to another page to edit or delete each specific contact. Is there a better way to do this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/29019-fetch-array/ Share on other sites More sharing options...
gluck Posted December 1, 2006 Share Posted December 1, 2006 If you are using sessions than you need to overwrite the session variable every time a new entry is selected. I think your code is not over writing the session vars. Normally people use Get or Post methods to transfer info. Quote Link to comment https://forums.phpfreaks.com/topic/29019-fetch-array/#findComment-133085 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.