Jump to content

Recommended Posts

<?php
session_start();
include("db.php");
echo "Your username:$username, Your key:$key";
mysql_query("UPDATE users SET active='yes' WHERE key='$key'");
?>

i have this code, the db.php file is fine, the $key and $username varibles come from the link, that allworks, but it doesnt want to update the feild "active". the keys match ect. im not sure what to try
Link to comment
https://forums.phpfreaks.com/topic/4719-problem-with-sql-query-update/
Share on other sites

[!--quoteo(post=354059:date=Mar 12 2006, 01:40 AM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Mar 12 2006, 01:40 AM) [snapback]354059[/snapback][/div][div class=\'quotemain\'][!--quotec--]
argh! i really should use a prefix for all my scripts
[/quote]

if you're going to use a reserved word.. you could encapsulate it like

[code]select * from users where [key] = '1'[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.