Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Localhost weirdness

Contributor ,
Jan 26, 2010 Jan 26, 2010

Copy link to clipboard

Copied

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

TOPICS
Server side applications

Views

506
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 27, 2010 Jan 27, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 02, 2010 Feb 02, 2010

Copy link to clipboard

Copied

LATEST

Have you got a mail server running on localhost?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines