I am converting a script that I wrote for a friend into a Joomla component for her new Joomla site

The script in PHP uses header() redirects and also uses $_SESSION to carry data from page to page.
My problem: I don't have a dev environment so I can't just test to see how Joomla handles these. (Looonnnggg story). I am also new to OOP . So I have some confusion..well a lot of confusion.

Anyway:
I would like to do this
$_SESSION['myVariable']=$_POST['sentValue'];
I need to add info from a form into a session variable to so that it's available throughout the script.
and also
if(!$testValue){
header('Location:compontentHomePageFile');
exit;
}
If a testfails I need to send the user back tot he form to fill out the info.
My question is: as these are written are they usable in the Joomla 1.0X environment? Or is there some sort of class (like the database class) that I need to call. If so what is it? Sorry I am lost in the docs.
Thanks for your patience and your help.
Gen
Noob Now
