fixed apply and save
This commit is contained in:
parent
fa203f16cc
commit
f369120fcc
|
|
@ -62,14 +62,14 @@ class DatabaseTable {
|
|||
}
|
||||
|
||||
public function save($record) {
|
||||
if (\empty($record[$pk])) {
|
||||
\unset($record[$pk]);
|
||||
if (empty($record[$this->pk])) {
|
||||
unset($record[$this->pk]);
|
||||
}
|
||||
try {
|
||||
insert($record);
|
||||
$this->insert($record);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
update($record);
|
||||
$this->update($record);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<section class="right">
|
||||
<h2>Apply for <?=$job->title?></h2>
|
||||
<form action="apply.php" method="POST" enctype="multipart/form-data">
|
||||
<form action="/jobs/apply" method="POST" enctype="multipart/form-data">
|
||||
<label>Your name</label>
|
||||
<input type="text" name="name" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue