Small help

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Cyberman
Forum Newbie
Posts: 1
Joined: Thu Jul 17, 2008 4:03 pm

Small help

Post 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?
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Small help

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