Jump to content

PHP Registration form not working


alandean

Recommended Posts

Hi, php newbie here, web developer newbie too!

 

Some time ago I did a website which included a course registration form which someone else created for me in php.  This worked fine and I amended the original to work on another website.  I am currently updating this second website and the php has stopped working, and I am no longer in contact with the original developer of the code.

 

The form is at: http://www.bisntechnologies.com/register.htm, and the php is:

 

<?php

 

/* ------- Stuff You Can Change --------- */

 

$recipient = 'registration@bisntechnologies.com';

$redirect  = 'confirmation.php';

 

/* -------------------------------------- */

 

$name = $HTTP_POST_VARS['name'];

$company = $HTTP_POST_VARS['company'];

$position = $HTTP_POST_VARS['position'];

$telephone = $HTTP_POST_VARS['telephone'];

$email = $HTTP_POST_VARS['email'];

$interest = $HTTP_POST_VARS['interest'];

$clientip = $_SERVER['REMOTE_ADDR'];

 

$msg = "Name: $name\nCompany: $company\nPosition: $position\nTelephone: $telephone\nE-mail: $email\nInterest: $interest\n\nIP Address: $clientip";

 

$replymsg = "<html><body style=\"font-family: Trebuchet MS; font-size: 13px\"><p>Dear $name,</p><p>Thank you for registering.</p><p><a href=\"http://www.bisntechnologies.com\"><img border=0 src=\"http://www.bisntechnologies.com/images/NewLogo.jpg\" alt=\"BiSN Technologies Ltd\"></a></p></body></html>";

 

if (mail($email,'Registration',$replymsg,"MIME-Version: 1.0\r\nContent-type: text/html;charset=iso-8859-1\r\nFrom: registration@bisntechnologies.com")) {

mail($recipient,'Registration Confirmation',$msg,"From: $email");

include($redirect);

} else {

  echo "<h4>\"$email\" is an invalid e-mail address. Please click the browser's Back button.</h4>";

}

 

?>

 

Putting in valid information gives the error:  "" is an invalid e-mail address. Please click the browser's Back button." which it didn't used to do.  I expect it is a very simple mistake but I cannot trace it.

 

Any help to pinpoint the problem greatly appreciated.

 

[attachment deleted by admin]

Link to comment
Share on other sites

DA,

 

Thank you for the very prompt reply.

 

Have changed as you advised with a global search and replace.  The form appears to be working correctly now.

 

Thank you so much.

 

 

 

PE - Not sure what you mean but will check whwn I have more time.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.