mathmatix Posted August 14, 2010 Share Posted August 14, 2010 Basically, I’m wondering if theres way i can have a notepad in the backend, to leave administrative notes for other employees using back end (preferablly right on the admin index) just like a simple text box that i can type a message into, click “save” and have that message stay in the text box untill someone backspaces it or adds something else.i hope i am being clear with what im requesting… for instance, i cant get mailserver to work with my wamp, so i editted the email form out, and replaced it with my companys email address and phone #… I would like to leave a note on the admin index with the login name and password for that email account so all employees have access… aswell, i would leave notes everytime i added or removed products… or if I needed to remind my employees to do or not do somethin specific, leave the msg there as well.. and aswell, any other employees can leave any notes regarding changes theyve made or questions they have… just basically a wway for employees to communicate with eacother regarding the site easily…i dont need it complex at all, i dont need it to recognize which user left the note, just simply a text input box that remembers the text even after you leave the page… Link to comment Share on other sites More sharing options...
mathmatix Posted August 15, 2010 Author Share Posted August 15, 2010 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... anyone?btw this is just a rough rough version to get the code itself working lol but ya.. HELP!! Link to comment Share on other sites More sharing options...
mathmatix Posted August 15, 2010 Author Share Posted August 15, 2010 bump help Link to comment Share on other sites More sharing options...
eltitos Posted August 15, 2010 Share Posted August 15, 2010 did you try the query by replacing `prestashop`.`am_np` with only the name of the table ?You know you can change $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 “); by include(dirname(__FILE__).'/config/config.inc.php'); Link to comment Share on other sites More sharing options...
mathmatix Posted August 16, 2010 Author Share Posted August 16, 2010 hey thanks for the reply...I actually [Moderated by Patric] around with it and basically got thru all the parse errors, but i when it tries to query thedatabase and display the table info, my apache server crashes and restarts... i have no idea why... ive read up on it n the solutions given for similar circumstances dont work...its like, if theres any parse error, itll tell me like normal, but it seems as soon as the query works n goes thru, it crashes... im running a wampserver on windows xp... any ideas?oh and thanks i forgot about include... i havent done anyhtin with php n years lol Link to comment Share on other sites More sharing options...
mathmatix Posted August 16, 2010 Author Share Posted August 16, 2010 ive noticed this http://www.prestashop.com/forums/member/edit_notepad/how hard would it be for them to include the exact same thing as an option in the backoffice index Link to comment Share on other sites More sharing options...
mathmatix Posted August 17, 2010 Author Share Posted August 17, 2010 does anyone have any idea how i could create that type of notepad ^^^then id just iframe it into my admin index... ive triedto make one by hand but it justkeeps crashing the server. :| Link to comment Share on other sites More sharing options...
Recommended Posts