UPDATE and redirect

From: Date: Wed, 11 Apr 2007 14:37:58 +0000
Subject: UPDATE and redirect
Groups: php.general 
Request: Send a blank email to php-general+get-252583@lists.php.net to get a copy of this message
Hi all, I'm new to this list and new to php programming so sorry if I do something wrong here :) Ok, now to my problem. I've created a query to update a mysql db, and it isn't working, and it's not throwing me any errors, so I need some help to figure out what's wrong here. My code follows : <? if($_GET['act'] = 'a'){ $action = 1; } else if ($_GET['act'] = 'd'){ $action = 0; } $id = $_GET['id']; mysql_connect("localhost","XXXX","XXXX") or die (mysql_error()); mysql_select_db ("taiomara_emailList"); $email_Query = mysql_query("UPDATE 'tb_emails' SET 'bol_active' = $action WHERE auto_id = $id"); mysql_close(); ?> The page is executed, but it don't update the table ... I've tried with the '' and without it ( the phpmyadmin page is where I got the idea of using the '' ). Any clues ? Also, how can I make a redirect after the query has run ? TIA Marcelo Wolfgang

« previous php.general (#252583) next »