PDA

View Full Version : MySQL Table Update Problem



Kishadotcom
October 26th, 2007, 15:47
I'm trying to update the value of the column license from "n" to "y".
I can't seem to figure it out.

Here's my current code


if ($_POST["$submit"])
{
$sql = "UPDATE site_user SET license='y' WHERE license='n'";
$result = mysql_query($sql);


Help would be greatly appreciated.

stuffradio
October 28th, 2007, 03:27
if ($_POST['submit_button_name) {
....

btw why are you updating a license column? Sounds phishy to me

Kishadotcom
October 30th, 2007, 02:11
it's for a client, he wants to manually upgrade the license of his clients. Anyways, I'll try what you suggested

Decker
October 30th, 2007, 04:09
That does sound fishy, and 'client' are you getting paid for this and using the forums to do your job ??