PHP scripting - again

  cowgirl66 17:10 21 Jul 2006

I have made a few alterations in my Email page on click here, and have written a short script in PHP to send this info to my Outlook Express email.

The sender is now greeted with a nice "thank you" message when it's sent;

But my little niggle now is that although the email form is sent, and the sender gets their thankyou, and the php actually DOES direct the message to my inbox,,,, there's nothing in it!

I am still missing somethng but don't know what.

I would be willing to provide the part of the scripting which might be causing the problem if that would help.

Any ideas?

Regards cowgirl66

  ade.h 17:55 21 Jul 2006

Feeling a bit put out now :-( LOL. What was wrong with the script that I sent you - which should work? (Tested it myself)

Can you send me your new file in an email attachment, please? I'll look it over for you.

  cowgirl66 18:07 21 Jul 2006

ade.h, if I knew the answer to that question I woudln't have been racking my brains over these past few days! Believe me, I so wanted your feedback.php script to work and I still have it, so I'm not all that bad lol.

I'm pleased to say that finally I've got the feedback in the message box, too.

But you can see my email source code online, and you can see my php script here;

$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "myemailaddress", "Email Results",
$message, "From: $name <$email>" );
header( "Location: click here" );

  ade.h 18:15 21 Jul 2006

You missed out the parameters that structure the contents of your email.

I'll make a revised file and send it to you shortly (just to avoid any formatting errors in the forum).

  ade.h 18:26 21 Jul 2006

I've sent you a new PHP file, but you will need to change the last URL from ...success.htm to ...thankyou.htm as per your posted code - I didn't see the new name for your success page as it had turned into a link.

  cowgirl66 18:49 21 Jul 2006

thank you for the script ade.h, but do you think I should swap files now that I have mine working?

I'm now getting the user's name, email address they use and their feedback. I know I don't have the advanced features you introduced into yours but I'm afraid I'll muck it up again!

With me, that's so easily done.

Regards cowgirl66

  cowgirl66 18:54 21 Jul 2006

And this is the place I went to for help, should others be wanting to learn about forms html and PHP scripting

click here

I had much of the hard work done in Dreamweaver but it was still interesting to make a new "pretend" form from scratch with this website's help, using html and not their design view !

  ade.h 19:04 21 Jul 2006

It only takes a minute to swap the files if you want to use mine, but keep yours in case your server doesn't like the extra code. It would be a good idea, because you really don't want to have your form used to send spam; people think that you were the orgininator and you get any bounced emails.

  ade.h 19:05 21 Jul 2006

Forgot to add:

Yours is called sendmail.php, but mine is called feedback.php. Rename it if you want to use it, or change your form action to match.

  cowgirl66 19:06 21 Jul 2006

Ok I'll give it a bash, hang on please

  ade.h 19:06 21 Jul 2006


and a major well done for learning PHP mail!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

InVision Studio takes on Adobe XD and Sketch

Camera tips to take better iPhone photos

Comment transformer un iPhone en borne Wi-Fi ?