Page 1 of 1

Small help

Posted: Thu Jul 17, 2008 4:07 pm
by Cyberman
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?

Re: Small help

Posted: Thu Jul 17, 2008 6:18 pm
by omniuni
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:

Code: Select all

<form action="?action=sent">
This would direct you to a page "sent.php" which will have the mail send function in it and a success message.

Code: Select all

<form action="sent.php">
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