tombruton Posted November 26, 2011 Share Posted November 26, 2011 <?php include 'heading.php'; include 'connect.php'; $username = $_GET["username"]; $validate = $_GET["key"]; print $username; print $validate; $query_activate_account = "UPDATE user SET validated = 'yes' WHERE (username = '$username' AND validationkey = '$validate')"; mysql_query("UPDATE user SET validated = 'yes' WHERE (username = 'lkmlklkmlkm' AND validationkey = '09f6b3d1fb65bb9f25965ab910376ef8'"); ?> it was mysql_query("UPDATE user SET validated = 'yes' WHERE (username = '$username' AND validationkey = '$validate'"); just put fixed values into test Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 26, 2011 Share Posted November 26, 2011 Can you define what "not working" means? Are there errors, or what? Quote Link to comment Share on other sites More sharing options...
tombruton Posted November 26, 2011 Author Share Posted November 26, 2011 no errors its just not updating the field from no to yes. cheers for the reply Quote Link to comment Share on other sites More sharing options...
tombruton Posted November 26, 2011 Author Share Posted November 26, 2011 sorry its the validated field, checked the right information is being posted in GET, thats why I put it in hardcoded. no luck tho. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 26, 2011 Share Posted November 26, 2011 Are you able to SELECT the record based on the WHERE clause you've used above? Does it return the right record? Quote Link to comment Share on other sites More sharing options...
tombruton Posted November 26, 2011 Author Share Posted November 26, 2011 i will have a look as soon as my girlfriend has finished watching xfacor on my laptop, any other ideas of what it could be, I really just can't work it out Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 26, 2011 Share Posted November 26, 2011 The only thing I see that would fall into the 'obvious' category is that the values in the database don't match the WHERE parameters, that's why I asked if you could SELECT the record based on those same values. If not, and the values appear to be the same, it's probably due to there being whitespace in one or both of them. Quote Link to comment Share on other sites More sharing options...
tombruton Posted November 26, 2011 Author Share Posted November 26, 2011 I can fetch the results not a problem. tried removing all wite space cant get it working Quote Link to comment Share on other sites More sharing options...
fenway Posted November 27, 2011 Share Posted November 27, 2011 Then you're updating the wrong database, or you're not telling us the whole story. Quote Link to comment Share on other sites More sharing options...
tombruton Posted November 27, 2011 Author Share Posted November 27, 2011 I not have it working. I deleted the query and wrote exactly the same thing again and it worked. I did copy and past the statment then changed the info inside. Might be some of those microsoft magic quotes in there Quote Link to comment 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.