Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

flash form

Thread Tools
 
Search this Thread
 
Old 18 February 2008, 10:18 PM
  #1  
HKSubaru
Scooby Senior
Thread Starter
 
HKSubaru's Avatar
 
Join Date: Apr 2002
Posts: 11,251
Likes: 0
Received 0 Likes on 0 Posts
Default flash form

I need to work out these for a friends site, what do i need to change to make them work? i have two type of languages, .asp and .php

ASP
<%
for i=1 to 7
message=Request("message")
next
message=message + Request("message")
smtpServer = "enter your SMTP SERVER HERE"
smtpPort = 25


name = Request("Your_Name:")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request("Your_Email:")
myMail.To = Request("recipient")
myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send

%>



PHP

<?
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}



reset($post_vars);
$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {

$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
}
next($post_vars);
}

mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>


Thanks in advance, its driving me nuts!
Old 19 February 2008, 08:58 AM
  #2  
boxst
Scooby Regular
 
boxst's Avatar
 
Join Date: Nov 1998
Posts: 11,905
Likes: 0
Received 0 Likes on 0 Posts
Default

What are you trying to do?

The first one looks as though you are passing a message via a form? But you are just getting the same variable 7 times. You need to make sure that the mail object is installed on the server (I use ASPMail instead of the Microsoft one).

Steve
Old 26 February 2008, 03:14 AM
  #3  
HKSubaru
Scooby Senior
Thread Starter
 
HKSubaru's Avatar
 
Join Date: Apr 2002
Posts: 11,251
Likes: 0
Received 0 Likes on 0 Posts
Default

thanks for the reply, yup trying to send a form to email, so i have to upload something first then?? what about the coding?
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Frizzle-Dee
Essex Subaru Owners Club
13
09 March 2019 07:35 PM
pkman
Security
7
26 January 2016 09:42 AM
Frizzle-Dee
Essex Subaru Owners Club
13
01 December 2015 09:37 AM
VictoriaYorks
Was it you?
2
14 November 2015 01:24 PM



Quick Reply: flash form



All times are GMT +1. The time now is 09:25 PM.