Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

createStudent.cfm 963 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  1. <!-- registerProcess.cfm -->
  2. <cfparam name="form.sname" default="">
  3. <cfparam name="form.major" default="">
  4. <cfparam name="form.level" default="">
  5. <cfparam name="form.byear" default="">
  6. <cfif form.sname neq "" and form.major neq "" and form.level neq "" and form.byear neq "">
  7. <!-- Perform student registration logic here -->
  8. <!-- Example: Insert student into database -->
  9. <cfquery datasource="task">
  10. INSERT INTO student (sname, major, level, byear)
  11. VALUES (
  12. <cfqueryparam value="#FORM.sname#" cfsqltype="CF_SQL_VARCHAR">,
  13. <cfqueryparam value="#FORM.major#" cfsqltype="CF_SQL_VARCHAR">,
  14. <cfqueryparam value="#FORM.level#" cfsqltype="CF_SQL_VARCHAR">,
  15. <cfqueryparam value="#FORM.byear#" cfsqltype="CF_SQL_INTEGER">
  16. )
  17. </cfquery>
  18. <p>Registration successful! <!-- Optionally provide a link or message here --></p>
  19. <cfelse>
  20. <p>Please fill out all fields.</p>
  21. </cfif>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...