Dealing with different jquery (ui) versions

You need to use jQuery.noConflict().


<!– New jquery ui version –>
<link rel=”stylesheet” type=”text/css” href=””>

<!– jquery ui function for the new version, changing the ‘$’ to ‘$jq’ –>
<script type=”text/javascript”>
$jq(function() {
// do something

<script type=’text/javascript’>
var $jq = jQuery.noConflict();

<!– Older jquery ui version –>
<script type=”text/javascript” src=”js/jquery-1.4.1.min.js”></script>

How to fix the error: Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘ODBC’@’localhost’ (using password: NO) in *.php on line *

You need a database connection prior to the functions..

$query = dbconnect(“select ‘test’;”);

(where dbconnect is a function to connect to the DB and “select ‘test’” is just a random query)


if (isset($_POST[‘submit’])){
$query = dbconnect(“select ‘test’;”);

$forename = mysql_real_escape_string(htmlspecialchars($_POST[‘forename’]));