Advertisement
talhachamp

Notes.php

Jan 6th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. all users notice here if they want to use tinymce and they get error like this so they must have to enter there table like this
  2. `mysql_real_escape_string($sql_table).
  3. `
  4. so my code is like this
  5.  
  6. $query = 'INSERT into notes VALUES(NULL, "'.date("Y-m-d").'", "'.$note_title.'")
  7.  
  8. so i just add mysql_realescape_string
  9.  
  10. $query = 'INSERT into notes VALUES(NULL, "'.date("Y-m-d").'", mysql_real_escape_string($notetitle))
  11.  
  12. and it works but it show me
  13.  
  14. > Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established i
  15.  
  16. so for that you have to add this in before that $query thing :)
  17.  
  18.     $con = mysql_pconnect("localhost","users","password");
  19. if (!$con)
  20.   {
  21.   die('Could not connect: ' . mysql_error());
  22.   }
  23.  
  24. and you'r done ..... thanks for all help
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement