Im new to making websites but have managed with dreamweaver and a vid from youtube on how to do a form I managed to get it all working.
But there is a snag when the form is complete it just shows a blank white page saying you have been successful, How would I instead direct to a new page please?
Oh and is it possible to trap errors such as blank lines in a form with PHP?
Small help
Moderator: General Moderators
Re: Small help
Look for the action= in the form code:
This will trigger the reloading of the same page, with a tag you can use to display a "sent" message, instead of/in addition to, your form:
This would direct you to a page "sent.php" which will have the mail send function in it and a success message.
I recommend strongly against relying on DreamWeaver. It generates horrible code in most cases, and works very strangely with PHP. It's not to say it doesn't work, and some people like it. I don't. I think it just complicates things.
I hope that helps, though.
-OmniUni
This will trigger the reloading of the same page, with a tag you can use to display a "sent" message, instead of/in addition to, your form:
Code: Select all
<form action="?action=sent">Code: Select all
<form action="sent.php">I hope that helps, though.
-OmniUni