Results 1 to 10 of 10
Feb 22, 2012, 05:13 #1
- Join Date
- Mar 2011
- 0 Post(s)
- 0 Thread(s)
Using PHP to run different queries within one page depending on a variable value
Hey guys I am creating a user account page where the user can access their account details from the users table, I want to have a few links on the account page that will allow them to do certain things with their information, such as view, change, edit password. So I was trying to make these options links that returned the same page but clicking a link sets a php variable to say 1, 2 or 3 and I have 3 queries written out and and if statement setting a condition if variable = 1 then run and display this query, or another etc...
I was doing this by creating a link like this:Code:
<li><a href='myaccount.php?userinfo=1'>View account info</a></li>
I cannot get this to work, can anyone tell me what I am doing wrong? The idea is that I can return the information from the table depending on what link the user clicks on.
I would appreciate any assistance with this.