Ive just designed my first contact form for my website so people can sign up to sell tickets to the event but when i click submit on the form it goes to a new page and says theResults all its meant to do is have a little box pop under neath submit sayin the success message. I am also receiving a email from the contact box but all it has in the email is the headers without any of the information.
I don't understand why this is happening i will post the php code if anybody could edit it so its right or tell me what i need to do to fix it this will be great.
PHP Code:
<?php
/* Subject and Email Variables */
$emailSubject = 'Insomnia All Ages Promoters';
$webMaster = 'aaron@superbsoundentertainment.com';
<div>
<div align="left">Thank you for signing up! We will be in contact with you very soon! Kind regards the team at Superb Sound Entertainment</div>
</div>
</body>
</html>
EOD;
echo "theResults";
Actually, now I look back at your form and email code I can see why you aren't getting any content - you are using variables in the body of your message but not defining them or allocating values (the variable names above where you assign the posted data are different). You code can also be simplified a lot:
PHP Code:
<?php
/* Subject and Email Variables */
$emailSubject = 'Insomnia All Ages Promoters';
$webMaster = 'aaron@superbsoundentertainment.com';
I am not sure if the form action (contactformprocess.php) is sending to a new page or the same page but if you want the success message to appear on the same page then the code above needs to be at the top of the page with your form and then underneath the Submit button on the form you would put:
Code:
<?php if ($success) { ?>
<div>
<div align="left">Thank you for signing up! We will be in contact with you very soon! Kind regards the team at Superb Sound Entertainment</div>
</div>
<?php } ?>
I'm not to sure what you mean by this I am not sure if the form action (contactformprocess.php) is sending to a new page or the same page but if you want the success message to appear on the same page then the code above needs to be at the top of the page with your form and then underneath the Submit button on the form you would put: could you please explain it a little more.
I changed the email code to the one you sent and when i clicked submit it went to a blank page that was it i recieved a email it had no information it said NameL ($name) so on for the other catergories. i also dont know where to put that success message.
my form is is on the index page i have placed it there and its target is the contactformprocess.php. how do i do this "If it is not contactformprocess.php then you need to change the action in the form to post the form to the same page as the form is on."
i changed the <br> to \n and it still isnt showing the information Name: {$name)/nEmail etc. if i send you the index.html file and the contactformprocess.php would you be able to fix it for me and have it say the success message on the same page as a drop down will be a great help
Bookmarks