Skip to main content
Inspiring
Jan 27, 2010 6:09 AM UTC
Question

Localhost weirdness

Hi:

Recently, I have been testing a couple of formmail scripts, which work fine on the remote server.

However, in my local testing server, when intentionally seeking a validation error, the formmail page is not returning properly.

It should be:

http://localhost/srbartending/srbregistermail.php

But it is coming up:

http://localhost/srbregistermail.php

The testing server shows:

C:\xampp\htdocs\srbartending\ and

http://localhost/srbartending/

Any ideas why it was working fine yesterday and not today?

Thx, Ned

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Feb 2, 2010 11:09 AM UTC

Have you got a mail server running on localhost?

Translate
NedwardAuthor
Inspiring
Jan 27, 2010 3:44 PM UTC

Here's the section of the formmail script that controls the affected area. It does work on the main site if you leave fields empty and submit.

www.santarosabartending.com/register.php

# Display HTML form with filled values

if ($validationFailed === true) {

$fileHtmlForm = '/register.php';

$codeHtmlForm = ProcessPHPFile($fileHtmlForm);

ProcessHiddenField($codeHtmlForm, 'LOGIN', $FTGLOGIN);
ProcessHiddenField($codeHtmlForm, 'PARTNER', $FTGPARTNER);
ProcessHiddenField($codeHtmlForm, 'TYPE', $FTGTYPE);
ProcessTextField($codeHtmlForm, 'first_name', $FTGfirst_name);
ProcessTextField($codeHtmlForm, 'last_name', $FTGlast_name);
ProcessTextField($codeHtmlForm, 'address', $FTGaddress);
ProcessTextField($codeHtmlForm, 'city', $FTGcity);
ProcessSelect($codeHtmlForm, 'state', $FTGstate);
ProcessTextField($codeHtmlForm, 'zip', $FTGzip);
ProcessTextField($codeHtmlForm, 'day_phone', $FTGday_phone);
ProcessTextField($codeHtmlForm, 'eve_phone', $FTGeve_phone);
ProcessTextField($codeHtmlForm, 'email', $FTGemail);
ProcessRadioButton($codeHtmlForm, 'class_time', $FTGclass_time);
ProcessTextField($codeHtmlForm, 'class_session', $FTGclass_session);
ProcessRadioButton($codeHtmlForm, 'AMOUNT', $FTGAMOUNT);


$errorList = @implode("<br />\n", $FTGErrorMessage);
$codeHtmlForm = str_replace('<!--VALIDATIONERROR-->', $errorList, $codeHtmlForm);

$codeHtmlForm = str_replace('<!--FIELDVALUE:LOGIN-->', $FTGLOGIN, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:PARTNER-->', $FTGPARTNER, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:TYPE-->', $FTGTYPE, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:first_name-->', $FTGfirst_name, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:last_name-->', $FTGlast_name, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:address-->', $FTGaddress, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:city-->', $FTGcity, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:state-->', $FTGstate, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:zip-->', $FTGzip, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:day_phone-->', $FTGday_phone, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:eve_phone-->', $FTGeve_phone, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:email-->', $FTGemail, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:class_time-->', $FTGclass_time, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:class_session-->', $FTGclass_session, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--FIELDVALUE:AMOUNT-->', $FTGAMOUNT, $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:first_name-->', $FTGErrorMessage['first_name'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:last_name-->', $FTGErrorMessage['last_name'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:address-->', $FTGErrorMessage['address'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:city-->', $FTGErrorMessage['city'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:state-->', $FTGErrorMessage['state'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:zip-->', $FTGErrorMessage['zip'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:day_phone-->', $FTGErrorMessage['day_phone'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:eve_phone-->', $FTGErrorMessage['eve_phone'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:email-->', $FTGErrorMessage['email'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:class_time-->', $FTGErrorMessage['class_time'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:class_session-->', $FTGErrorMessage['class_session'], $codeHtmlForm);
$codeHtmlForm = str_replace('<!--ERRORMSG:AMOUNT-->', $FTGErrorMessage['AMOUNT'], $codeHtmlForm);

echo $codeHtmlForm;

}

if ( $validationFailed === false ) {

Thx, Ned

Translate