Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8435a1

Browse files
authored
Create action.php
1 parent 38f6665 commit f8435a1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

‎action.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
$post_action = isset($_POST['action']) && ! empty($_POST['action'] ? $_POST['action'] : null;
4+
5+
if ( ! is_null($post_action)) {
6+
switch ($post_action) {
7+
case 'save_email':
8+
save_email();
9+
break;
10+
default:
11+
show_index();
12+
break;
13+
}
14+
} else {
15+
show_index();
16+
}
17+
18+
19+
/// functions
20+
21+
function save_email() {
22+
// connect to database
23+
24+
// create prepared statement, save to db
25+
26+
show_index():
27+
}
28+
29+
function show_index() {
30+
header('Location: index.php');
31+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /