php mysql help

Drips
04-10-2008, 10:38 PM
hey, can someone correct this code for me?

$userName = $_SESSION['userName'];
$query = "INSERT INTO `users` (name, location, funds, time, email) VALUES ('$_POST[name]','$_POST[location]','$_POST[funds]','$_POST[time]','$_POST[email]') WHERE `username` = '$userName'";
$result = mysql_query($query);

KnightMare
04-10-2008, 10:47 PM
have you tried putting ' in the $_POST?

$_POST['name']

Drips
04-11-2008, 12:06 AM
edit: trying now

The Todd
04-21-2008, 05:39 PM
Specifically, what kind of error are you getting - just a SQL error?