actually, problem solved. I made a mistake putting mysql_real_escape() for the post value, so it was accessing the file, but nothing passed to database. Thanks for the help
I have a problem of getting the url within .ajax() to refer to the correct folder
In the root I have folders /functions and /js
My php page included a js file /js/min/custom-ck.js
Inside custom-ck.js, I have .ajax() to refer to php file named updatebg.php within /functions folder (/functions/updatebg.php)
$.ajax({
url : '/functions/updatebg.php',
type : 'POST',
dataType : 'text',
data : {
'bg' : bg
},
Can someone help me getting the absolute url right?
Thanks a lot.
actually, problem solved. I made a mistake putting
mysql_real_escape()for the post value, so it was accessing the file, but nothing passed to database. Thanks for the help