...

View Full Version : confirm page after html form submission



lse123
08-23-2007, 01:22 PM
how to include confirm page code to formprocessor.asp ? asp vars how setup to show on this webpage ? I just assign to vars the data in the email processor file ? var1 = request.form("field1") and so on and use <%= var1 %> to confirm page ? What statement to use to include the confirm page ?

Daemonspyre
08-23-2007, 08:16 PM
If you want variables to persist from page to page, you need to use either session variables or querystrings.

As to using INCLUDEs, you need to base your statements on whether or not your host has Enabled Parent Paths in IIS.

With parent paths:

<!-- #include file="your_include.asp" -->

Without parent paths:

<!-- @include virtual="your _include.asp" -->

As I have seen you ask some of the most basic ASP questions over and over again, you need to bookmark the following sites:

http://www.w3schools.com
http://www.asp101.com

They have code snippets that you can use to help you accomplish what you are trying to do.

lse123
08-24-2007, 09:32 AM
If I use
<!-- #include file="confirm.asp" -->
then how vars in confirm.asp shown, I must just assign to vars the data in the email processor file ? var1 = request.form("field1") and so on and use <%= var1 %> to confirm page ?
you know any sample asp code that, has confirm page and email body an another page bodyemail.asp both with values from form, and this code send the email to a fixed mine address and to email html form field value in form ?

Daemonspyre
08-24-2007, 02:10 PM
What you are asking for is available HERE (http://asp101.com/samples/viewasp.asp?file=email_html.asp).

One of your original questions was HOW to use includes. They will not do what you want here, as INCLUDEs are used to parse 2 files together, not to use variables in one page or another.

lse123
08-24-2007, 03:34 PM
As strBody = "<!DOCTYPE HTML PUBLIC ....................
may include a file ?

As how to include a file As confirm page[after form submission page] ?

I want to do the same in asp as the following code in php:

<?php

/* recipients */
$email = $_POST['EmailAddress'];
$to = "fontana@cytanet.com.cy,fontanatours@yahoo.com";
// if ($email != '') { $to .= ','.$email; }

$subject = "Booking Request - PafosCarHire.com"; // new form field

$country = $_POST['country'];
$Name = $_POST['Name'];
$Address = $_POST['Address'];
$CityPostCode = $_POST['CityPostCode'];
$phone = $_POST['Phone'];
$wphone = $_POST['WorkPhone'];
$YearStart = $_POST['YearStart'];
$MonthStart = $_POST['MonthStart'];
$DayStart = $_POST['DayStart'];
$PickUpTimehours = $_POST['PickUpTimehours'];
$PickUpTimeMins = $_POST['PickUpTimeMins'];
$DayNumber = $_POST['DayNumber'];
$PICKUPLocation = $_POST['PICKUPLocation'];
$OtherPickUp = $_POST['OtherPickUp'];
$DropOffYear = $_POST['DropOffYear'];
$DropOffMonth = $_POST['DropOffMonth'];
$DropOffday = $_POST['DropOffday'];
$DropOffTimehours = $_POST['DropOffTimehours'];
$DropOffTimeMinutes = $_POST['DropOffTimeMinutes'];
$DROPOFFLocation = $_POST['DROPOFFLocation'];
$OtherDropOff = $_POST['OtherDropOff'];
$cartype = $_POST['cartype'];
$SecondCarGroup = $_POST['SecondCarGroup'];
$Notes = $_POST['Notes'];
$affiliate = $_POST['affiliate'];


include_once ("email-manual.php");

ob_start();
include('email-manual.php');
$message = ob_get_clean();

ob_start();
include('email-manual_printable.php');
$message1 = ob_get_clean();

$headers = "From:fontana@cytanet.com.cy";
// $headers .= "\nBcc:fontanatours@yahoo.com";
$headers .= "\nReply-To:fontana@cytanet.com.cy";
$headers .= "\nContent-Type: text/html; charset=UTF-8";
$headers .= "\nMIME-Version: 1.0";

mail($to,$subject,$message1,$headers);
mail($email,$subject,$message,$headers);
// http://www.codingforums.com/showthread.php?p=573908#post573908
?>

lse123
09-03-2007, 08:13 AM
answer asap

Daemonspyre
09-03-2007, 05:09 PM
Since we don't know what any of the includes or functions here do, we cannot help you.

We are not going to write the code for you, but will help you get you going in the right direction.

If you want to use an ASP mailer with includes, search the web (http://www.asp101.com and http://www.4guysfromrolla.com) and Google your questions for script kiddies code to do what you want.

lse123
09-03-2007, 06:10 PM
The first php file used as confirm page/email to internet user and the second used as email to website owner[paphoscarhire.com_both files contain dynamic code like <?= $country ?> ], just tell me code in asp of below:

<?
...............................................
include_once ("email-manual.php");

ob_start();
include('email-manual.php');
$message = ob_get_clean();

ob_start();
include('email-manual_printable.php');
$message1 = ob_get_clean();

$headers = "From:fontana@cytanet.com.cy";
$headers .= "\nReply-To:fontana@cytanet.com.cy";
$headers .= "\nContent-Type: text/html; charset=UTF-8";
$headers .= "\nMIME-Version: 1.0";

mail($to,$subject,$message1,$headers);
mail($email,$subject,$message,$headers);
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum