Forum Moderators: coopster

Message Too Old, No Replies

Form processing

         

Dexie

1:22 pm on Sep 15, 2005 (gmt 0)

10+ Year Member



Just trying to do a couple of things - For when someone completes the page below, they see a page where thet can view the contents of what they completed, before pressing send, and then, if they press send, the form contents gets emailed to them and to me:

I've been googling a for a few days and visited the usual sites, but can't seem to find the little bits of script that I need - can anyone let me know what they are please?

Any help appreciated.

Dexie.

[edited by: coopster at 2:44 pm (utc) on Sep. 15, 2005]
[edit reason] removed url [/edit]

coopster

2:44 pm on Sep 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you read through out PHP Forum Library [webmasterworld.com]? There is a good read in there regarding the Basics of Submitting and Emailing Forms with PHP [webmasterworld.com].

Dexie

3:49 pm on Sep 15, 2005 (gmt 0)

10+ Year Member



Sorry 'bout the link Coopster, must admit I've been a bit down about this coding and forgot about the urls rule ;-)

Thanks for the link though.

Dexie.

coopster

3:51 pm on Sep 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Apology accepted ;)

That thread contains a comprehensive start written by jatar_k that should get you on the right track.

Dexie

2:42 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



Hi Coopster, studied all of the code from that link, but can't seem to find what I'm looking for there.

What php code do I use, if I want a red asterisk to show beside the field that the user hasn't completed please?

Dexie.

coopster

2:43 pm on Sep 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Well, that would just be basic HTML formatting. You layout the red asterisk just as if it was going to be there all the time. Once you get it looking the way you want, you merely wrap a little PHP logic around it so that it doesn't print out unless you tell it to.

Dexie

3:29 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



The basic html isn't the problem, and it isn't needed for any printing, but how do you ensure the warning message comes up on the same page, if they haven't completed a certain part of it?

Dexie.

coopster

9:59 pm on Sep 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



When I referred to the printing I meant the output to the browser.
if (!isset($_POST['firstname']) OR !trim($_POST['firstname'])) { 
print "red asterisk";
}

Dexie

7:48 am on Sep 17, 2005 (gmt 0)

10+ Year Member



Ahhhh thanks for that.

Terminology keeps changing - when I was younger, printing meant . . . . . . . . . . . . to print ;-)