I set the primary key on username and develop a page for modification. I made three pages for modification the first page is search form that searches the specific record. The all the contents are displayed on next page. There is form with <input type=text value=$variable> after modifications submit the form but there is no modifies the specific record my all queries is right. I checked all aspects of code. When I omit the primary key field the code execute perfectly and also when I use this query in control panel of the web page it is working perfectly. What is the matter I don’t know please help me in this matter. I’m working under Unix operating system with MYSQL. The original query is:
$sql= " UPDATE dealers SET
username = ‘$user_name’,
userpassword = '$user_password',
code = '$code'
WHERE username ='$user_name'
";
The table definition is:
- dealers (table name)
§ Field Type Null Key Default Extra
§ username char(11) PRI
§ userpassword char(11)
§ code char(4)