mathmatix Posted August 15, 2010 Share Posted August 15, 2010 im basically trying to build a notepad for the employees inthe admin section..so i decided i was just going to add a table to the prestashop database, insert the first note from mysql, and create a php form that would update and echo the note based on last employee input… however im getting a parse error that i dont understand… its in my $sql query itself but i dont know what it is…i get this msgParse error: parse error in C:\wamp\www\note2.php on line 18and line 18 is$sql = “UPDATE `prestashop`.`am_np` SET `note` = ‘$note’ WHERE `am_np`.`id` = 1 LIMIT 1;”;here is the full code (this is only for the end page of the script, but i know the request functions are working because i can successfuly echo user input from previous page) i just cant get that user input to update into the database<?php$username = “root”;$password = “mypassword”;$hostname = “localhost”;//connection to the database$dbhandle = mysql_connect($hostname, $username, $password) or die(“Unable to connect to MySQL”);echo “Connected to MySQL“;//select a database to work with$selected = mysql_select_db(“prestashop”,$dbhandle) or die(“Could not select “);$note = ‘_REQUEST[“note”];’$sql = “UPDATE `prestashop`.`am_np` SET `note` = ‘$note’ WHERE `am_np`.`id` = 1 LIMIT 1;”;mysql_query($sql) or die(mysql_error()); /?> Thank you for your comment. click here </html>?>ive also tried changing the $note to ‘”.$note’”, “’.$note.’”, “$note”, and every other stupid little variation… i even broke up the line to see if the parse error moved, and it seems ive narrowed it down to the $sql variable itself, but when i change it to something else i get the same error =( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now