upload resumes to database
Posted: Fri Oct 24, 2003 4:36 pm
I need to create a page which allows job candidates to insert their info and upload a resume into a database from the web. Then it needs to notify HR by e-mail that a new resume has been added.
I created a dynamic form in Dreamweaver. But can't seem to figure out where to go from there. I've seen lots of different code on the web. But none of it seems to be exactly what I'm looking for since it doesn't look like Dreamweaver code. The more I search for code, the more confused I get about how to do this. So maybe someone could offer some suggestions on what code to use. I know a $_POST and INSERT INTO is needed somewhere. But with Dreamweaver assigning the variables on it's own, I'm not sure how much extra code is needed.
The PHP setup is:
And the form is like this:
?>
I created a dynamic form in Dreamweaver. But can't seem to figure out where to go from there. I've seen lots of different code on the web. But none of it seems to be exactly what I'm looking for since it doesn't look like Dreamweaver code. The more I search for code, the more confused I get about how to do this. So maybe someone could offer some suggestions on what code to use. I know a $_POST and INSERT INTO is needed somewhere. But with Dreamweaver assigning the variables on it's own, I'm not sure how much extra code is needed.
The PHP setup is:
Code: Select all
<?php require_once('Connections/EagleMain.php'); ?>
<?php
mysql_select_db($database_EagleMain, $EagleMain);
$query_submitResume = "SELECT * FROM candidates";
$submitResume = mysql_query($query_submitResume, $EagleMain) or die('<p>Error processing resumes from the database!<br> />'.
'Error: ' . mysql_error() . '</p>');
$row_submitResume = mysql_fetch_assoc($submitResume);
$totalRows_submitResume = mysql_num_rows($submitResume);
?>Code: Select all
<table>
<tr><td><form action="thankyou.htm" method="post" enctype="multipart/form-data" name="resumesubmit">
<table>
<tr><tdFirst Name:</td><td><input name="firstname" type="text" value="<?php echo $row_submitResumeї'candFirstName']; ?>"></td></tr>
<tr><td>Last Name:</td><td><input name="lastname" type="text" value="<?php echo $row_submitResumeї'candLastName']; ?>"></td></tr>
<tr><td>Address:</td><td><input name="address" type="text" value="<?php echo $row_submitResumeї'candAddress']; ?>"></td></tr>
<tr><td>City:</td><td><input name="city" type="text" value="<?php echo $row_submitResumeї'candCity']; ?>"></td></tr>
<tr><td>State:</td><td><input name="state" type="text" value="<?php echo $row_submitResumeї'candState']; ?>"></td></tr>
<tr><td>Zip:</td><td><input name="zip" type="text" value="<?php echo $row_submitResumeї'candZip']; ?>"></td></tr>
<tr><td>Phone:</td><td><input name="phone" type="text" value="<?php echo $row_submitResumeї'candPhone']; ?>"></td></tr>
<tr><td>Fax:</td><td><input name="fax" type="text" value="<?php echo $row_submitResumeї'candFax']; ?>"></td></tr>
<tr><td>E-mail:</td><td><input name="email" type="text" value="<?php echo $row_submitResumeї'candEmail']; ?>"></td></tr>
<tr><td>Paste cover letter here:</td><td><textarea name="coverletter" cols="25" rows="6"><?php echo $row_submitResumeї'coverLetter']; ?></textarea></td></tr>
<tr><td>Upload resume (MS Word or ASCII format):</td><td><input name="file" type="file" value="<?php echo $row_submitResumeї'candResume']; ?>"></td></tr>
<tr><td>Type of job you're looking for:</td><td><textarea name="jobtype"><?php echo $row_submitResumeї'jobType']; ?></textarea></td></tr>
<tr><td>Insert Job ID of job you're applying for:</td><td><input name="textfield" type="text" value="<?php echo $row_submitResumeї'jobID']; ?>"></td></tr>
<tr><td>&nbsp;</td><td><input type="submit" name="Submit" value="Submit Resume"></td></tr>
</table>