Jump to content

update query not working


tombruton

Recommended Posts

<?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

 

Link to comment
https://forums.phpfreaks.com/topic/251841-update-query-not-working/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.