Page 1 of 1

Please Help. Newbie here :) Thank you in advance..

Posted: Thu Sep 08, 2016 5:01 pm
by jaymar2595
The form below should send an email to a list of employees upon hitting on the submit button. But due to a code error the email won’t send and users say that they only see a blank screen upon clicking submit. Find the code that breaks the process.

Code: Select all

<form id="formlogin" action="send_form_email.php" method="pos">
		<legend>
    	First Name: <input type="text" id="fname" />
    	</legend>
    	<legend>
    	Last Name: <input type="text" id="lname" />
    	</legend>
<button type="submit">Submit</button> 
</form>

Re: Please Help. Newbie here :) Thank you in advance..

Posted: Thu Sep 08, 2016 7:36 pm
by Celauran
Method should be 'post', not 'pos'. More importantly, this is not the code that actually sends the email, so we're completely in the dark.

Re: Please Help. Newbie here :) Thank you in advance..

Posted: Thu Sep 08, 2016 10:44 pm
by requinix
A blank screen often means a syntax error in your code. Any PHP IDE, and even some plain editors, will be able to tell you about those.

That said, if your code is wrapped in a big "if ($_POST) {" then that method=pos typo will certainly cause nothing to happen.