trying to call my MSQL database using a movie title to get plot info. I tested that the movie title does pass correctly to my function using alert statement, so that worked well. The problem is when I try to pass the title to my php/mysql it shows me the title did pass when I use echo $q1 in my php, but I get blank info from my data base. However if I force set a title $q1="127 Hours" in my php file , everything works. so it's a bit confusing to me.
function getmoviepic_mobile(movietitle){
var Movie = $(movietitle).text();
alert(Movie);
$('#dvdinfo').load('getuser2_mobile.php', {input:Movie});
}
PHP File..
include("includes/connection.php");
$q1=$_POST['input'];
echo $q1;
//$q1="127 Hours";
$result = mysql_query("SELECT
id,title,actors,plot,catagory,release_date,rated FROM ".TBL_DATA." WHERE
title = '".$q1."' ");
while($row = mysql_fetch_array($result)) {
echo "<div <p> ".$row['title']." <p> </div>";
echo "<div <p>".$row['plot']." <p> </div>";
}