Using .load to get data from my PHP code

Using .load to get data from my PHP code

Hi Everyone,

I don't know if the .load is the correct function to use, please correct me if I am wrong.
I don't know if the .load function triggers the PHP code to run by itself or if I need to use
.load in conjunction with another function to do this? Possibly .ajax with POST??? not sure.

Anyways, if I use the .load function in this way:

$("#data1").load("read.php $db_data1");

will this fetch the variable $db_data1 inside read.php and place it in data1 HTML input field?

The above is returning an error :

Uncaught Error: Syntax error, unrecognized expression: $db_data1

By the way, $db_data1 exist inside my read.php code.

Thanks,
Neil