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 Feb 18, 2008 | 10:18 PM
  #1  
HKSubaru's Avatar
HKSubaru
Thread Starter
Scooby Senior
 
Joined: Apr 2002
Posts: 11,251
Likes: 0
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!
Reply
Old Feb 19, 2008 | 08:58 AM
  #2  
boxst's Avatar
boxst
Scooby Regular
 
Joined: Nov 1998
Posts: 11,905
Likes: 0
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
Reply
Old Feb 26, 2008 | 03:14 AM
  #3  
HKSubaru's Avatar
HKSubaru
Thread Starter
Scooby Senior
 
Joined: Apr 2002
Posts: 11,251
Likes: 0
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?
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Frizzle-Dee
Essex Subaru Owners Club
13
Mar 9, 2019 07:35 PM
pkman
Security
7
Jan 26, 2016 09:42 AM
Frizzle-Dee
Essex Subaru Owners Club
13
Dec 1, 2015 09:37 AM
VictoriaYorks
Was it you?
2
Nov 14, 2015 01:24 PM




All times are GMT +1. The time now is 08:49 AM.