Total members 11894 |It is currently Fri Nov 22, 2024 10:31 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Hi all! ... I used TrendyFlash Site Builder to create a site, which generated a 'contact.php' file that I need to modify.
Basically it calls for the user to send a comment with a name, email id, subject and message. I need it to send those details to an external email id that I specify. Here's the script as generated by the software in that 'contact.php' file :

<!-- script starts here-->
<?

$contactfield1=$HTTP_GET_VARS["contactfield1"]
$contactfield2=$HTTP_GET_VARS["contactfield2"]
$contactfield3=$HTTP_GET_VARS["contactfield3"]
$contactfield4=$HTTP_GET_VARS["contactfield4"]

$email_from = "[email protected]";
$email_subject = "" ;
//$email_txt = "";
$email_to = "[email protected]";

$email_message = "field1: $contactfield1\n
field2 :$contactfield2 \n
field3 :$contactfield3 \n
field4 : $contactfield4 \n

";

mail($email_to, $email_subject, $email_message,$email_from);

?>

<!--script ends here-->

OK ... i went through some sample contact form scripts online and modified it like this :

<?php

// I should think the following 4 lines correspond to the 4 fields indicated in the screenshot attached at the end
// of this message

$contactfield1=$_POST["name"]
$contactfield2=$_POST["email_from"]
$contactfield3=$_POST["subject"]
$contactfield4=$_POST["comment"]

$email_from = "";
$subject = "" ;
//$email_txt = "";
$email_to = "my email id here";

$message = "field1: $contactfield1\n
field2 :$contactfield2 \n
field3 :$contactfield3 \n
field4 : $contactfield4 \n

";

mail($email_to, $subject, $message,$email_from);

?>

So is this right ? I uploaded it to test it, but it doesn't seem to work as I'm not getting anything in my email box.
If I can only get this script right, I can apply it to all future sites that I create using this software. So I just need to get it right once. This software isn't designed for scripting- PHP or otherwise, so it needs the user to know PHP if he wishes to go by that route (else I'd have to only publish the site to CD). Also if it requires any proper formatting (as some lines in the script seem to me to be out of place), then provide that too.

Any takers?

Regards,

C.

PS. In case yor interested, you can view the site as I created it at this link --> http://visitmyspace.sitegoz.com/
(just need that damn script to work!) :)





Attachments:
File comment: screenshot
contact.jpg
contact.jpg [ 203.6 KiB | Viewed 5003 times ]
Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

usefull contactform


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

yeah ... but it doesn't work for me as it's supposed to :(


Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Beginner needs help- simple 'mail_to' contact form in PHP
 Adding a New Node to contact.xml     -  
 Beginner help on includes     -  
 I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER     -  
 Hi im a beginner in java im facing problem please help me     -  
 php login form (sign-in form)     -  
 OpenGl simple example     -  
 php simple XML parser     -  
 Simple animation     -  
 Simple Calculator     -  
 Simple Light     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com