I want to use my form variables in other page which is not specified in action attribute. Please help me out !!! My code is below :
<body>
<?php require("common.php");?>
<h1> <?php echo(COMPANY); ?> Job Application </h1>
<p> Are you looking for an exciting career in the world of cyclery ?
Look no further !
</p>
<form name="frmJobApp" method="post" enctype="multipart/form-data" action="jobapp action.php">
Please enter Your Name (<i>required</i>):
<input name="applicant" type="text" /><br />
Please enter your telephone number :
<input type="text" name="phone" /><br />
Please enter your full mailing address :<br />
<textarea name="addr" rows="5" cols="40" wrap="soft"></textarea><br />
Please enter your email address (<i>required</i>):
<input type="text" name="email" /><br />
Please select the type of position in which you are interested :
<select name="position">
<option value="a"> Accounting </option>
<option value="b"> Bicycle repair </option>
<option value="h"> Human Resources </option>
<option value="m"> Management </option>
<option value="s"> Sales </option>
</select><br />
Please select the name of the country in which you would like to work :
<select name="country">
<option value="cn">Canada </option>
<option value="cr">Costa Rica </option>
<option value="ge">Germany</option>
<option value="uk">United Kingdom</option>
<option value="us">United States</option>
</select><br />
Please Upload your resume :
<input type="hidden" name="max_file_size" value="10000" />
<input type="file" name="userfile" /><br />
<input name="avail" type="checkbox" /> Available Immediately<br />
<input name="enter" type="submit" value="Enter" />
</form>
</body>
</html>
I WANT TO USE THE VARIABLE "$applicant" FROM ABOVE FORM TO USE IN THE BELOW GIVEN SCRIPT ....I m not able to pass the value of $applicant from the form page to this page...PLS TELL ME HOW TO
<body>
<?php
chdir("/applicants");
$dir="./$applicant";
$count=0;
while(is_dir($dir))
{
$count++;
$dir=$_SESSION['applicant'].$count;
}
mkdir($dir,0700);
copy("/temp/$applicant", $dir . "/resume.txt");
unlink("/temp/$applicant");
$to="hr@phop'sbicycles.com";
$subj="Online Application";
$header="\nFrom:
[email protected]\n";
$body="\n Name:".quotemeta($applicant) ;
$success=mail($to,$subj,$body,$header);
$textfile=fopen($dir."/details.txt","w");
fwrite($textfile,$body);
fclose($textfile);
if($success)
{
echo("Your application has been sent successfully");
}
else
{
echo("Error sending Application");
}
?>
</body>
</html>
</body>