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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymar2595
Forum Newbie
Posts: 1
Joined: Thu Sep 08, 2016 4:57 pm

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

Post 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>
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

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

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post 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.
Post Reply