[tt]$query = "INSERT INTO setup (photo) VALUES ('$f_org') WHERE screen_name = '" . $_SESSION['screen_name'] . "'";[/tt]
should do it.
I'm getting this error message when trying to insert the data using '" . $_SESSION['screen_name'] . "'";
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE screen_name = 'test_screenname'' at line 1.
test_screenname being the value of the session variable. Any ideas of what I'm doing wrong?
Then you should use an [tt]UPDATE[/tt] query, something like
[tt]$query = "UPDATE setup SET photo = '$f_org' WHERE screen_name = '" . $_SESSION['screen_name'] . "'";[/tt]
should work if I understand correctly.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.