%
option explicit
Response.Buffer = true
if session("company_id") <> "" then
dim conn
dim rs
dim ssql
dim sJob_Id
dim sJob_Title
dim sJob_Description
dim return_page
%>
<%
sJob_Id = day(now) & month(now) & year(now) & hour(now) & minute(now) & second(now)
sJob_Title = trim(Request.Form("job_title"))
sJob_Description = trim(Request.Form("job_description"))
'replace vbCrLf to
if len(sJob_Description) > 0 then
sJob_Description = replace(sJob_Description, vbcrlf, "
", 1, -1, 1)
end if
set rs = server.CreateObject("adodb.recordset")
rs.Open "tbl_career",conn,3,3
'add new data
rs.AddNew
rs.Fields("job_id") = sJob_Id
rs.Fields("job_title") = sJob_Title
rs.Fields("job_description") = sJob_Description
rs.Update
rs.Close
conn.Close
set rs = nothing
set conn = nothing
return_page = ""
Response.Write return_page
else
Response.Redirect "../../index.asp"
end if
%>