Redefining Mysql connection

I have a form based on sql connection conn_jojik. In that form is a button which have a prepared statement directed to the same database and I want to use a prepared statement to do a low level read as follows:
$handle = fopen(“c:/raw/intake/{getraw}”, “r”);
if ($handle) {
while (($line = fgets($handle)) !== false) {
$sql=“INSERT INTO loadtable SET wstring=?”;
$stmt =conn_jojik->prepare($sql);
$stmt->execute(array( $line ));

It does not see conn_jojik as a valid connection (claiming it is an undeclared variable) unless I totally redefine it in this button. Is there a better way to reference this without having to redefine it?