hyipcharts Posted March 10, 2007 Share Posted March 10, 2007 Hey again,On to problem #2. When a person joins my site they have to be approved by admin to be listed. In my admin area I have a waiting list and I click on approve or decline. However, when I click on approve or decline nothing happens. The page only refreshes. Is there another way to write this code? <td valign=top width=33%> <a href="?a=approve_listing&lid='; echo $list['id']; echo '&gid='; echo $frm['gid']; echo '&p='; echo $frm['p']; echo '&return=new_listings">[approve]</a><br> Thanks in advance Link to comment Share on other sites More sharing options...
Mr_CHISOL Posted March 10, 2007 Share Posted March 10, 2007 Hi!What code do you have that handles the "call" (updates the db)?You need something that updates the info in the database using an UPDATE-statement.smething like this: if (isset($_GET['a'])) { if ($_GET['a'] == 'approve_listing') { $SQL = 'UPDATE table SET approved = 1 WHERE id='.$_GET['lid']: } else if ($_GET['a'] == 'deny_listing') { $SQL = 'DELETE * FROM table WHERE id='.$_GET['lid']: } else exit(); mysql_query( $SQL ) or die('Error: '.mysql_error() );} Hope that helped.Good Luck and Don't Panic! Link to comment Share on other sites More sharing options...
hyipcharts Posted March 10, 2007 Author Share Posted March 10, 2007 Hi!What code do you have that handles the "call" (updates the db)?You need something that updates the info in the database using an UPDATE-statement.smething like this:if (isset($_GET['a'])) { if ($_GET['a'] == 'approve_listing') { $SQL = 'UPDATE table SET approved = 1 WHERE id='.$_GET['lid']: } else if ($_GET['a'] == 'deny_listing') { $SQL = 'DELETE * FROM table WHERE id='.$_GET['lid']: } else exit(); mysql_query( $SQL ) or die('Error: '.mysql_error() );} Hope that helped.Good Luck and Don't Panic! Thanks for that. It could be something I missed. I will recheck the code and see if it is calling the db. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now