File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+ < body >
4+
5+ < form action ="mail.php " method ="post ">
6+ Name: < input type ="text " name ="name "> < br >
7+ E-mail: < input type ="text " name ="email "> < br >
8+ Subject: < input type ="text " name ="sub "> < br >
9+ Message: < textarea name ="msg ">
10+ </ textarea >
11+ < input type ="submit ">
12+ </ form >
13+
14+ </ body >
15+ </ html >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ session_start ();
4+ include_once 'dbconnect.php ' ;
5+
6+ $ res =mysql_query ("SELECT * FROM users WHERE user_id= " .$ _SESSION ['user ' ]);
7+ $ userRow =mysql_fetch_array ($ res );
8+
9+ $ account = $ userRow ['username ' ];
10+
11+
12+ if (!isset ($ _SESSION ['user ' ]))
13+ {
14+ $ account = $ _POST ['name ' ];
15+ }
16+
17+
18+ $ to = "hittmana@comcast.net " ;
19+ $ subject = $ _POST ['sub ' ];
20+ $ txt = $ _POST ['msg ' ];
21+ $ email = $ _POST ['email ' ];
22+ $ headers = "From: Ahitt-Industries || " . $ email . " || " . $ account ;
23+
24+ mail ($ to ,$ subject ,$ txt ,$ headers );
25+ ?>
You can’t perform that action at this time.
0 commit comments