Getting a strange error message, can't solve it.

Hello phphelp!

Currently I’m having some major issues with my php code that giving a strange error message that I can’t solve. What my code will do is simply be able to change databas information without accesing phpmyadmin.

Code:
http://pastebin.com/swLN78vE

Error message:

Notice: Undefined variable: kunder in D:\wamp\www\projekt\modify.php on line 16 Call Stack #TimeMemoryFunctionLocation 10.0005253784{main}( )..\modify.php:0 "/> Notice: Undefined variable: kunder in D:\wamp\www\projekt\modify.php on line 18 Call Stack #TimeMemoryFunctionLocation 10.0005253784{main}( )..\modify.php:0 "/>

What I think the problem is that $kunder variable won’t store the information. But I have no clue how to solve it.

I’m not rewriting any code as you’re using old style mysql_query which is deprecated and will be removed from PHP (God I should just put this in my footer). See here for that: http://uk1.php.net/mysql_query

The problem is here:

[php]"<?php echo $kunder['Name']; ?>"/>[/php]

You’ve defined it as $person not $kunder

You should read up on SQL injection and XSS, your webapp is very insecure.

The problem is as mentioned that your sql results are in the variable $person and you’re trying to use an undefined variable $kunder

Sponsor our Newsletter | Privacy Policy | Terms of Service