Jump to content

conrad1234

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

conrad1234's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so, this is the code I'll need to be using right? <?php $contactfield1=$_POST["contactfield1"]; //or $_GET, whichever works $contactfield2=$_POST["contactfield2"]; // ---------"ditto"---------- $contactfield3=$_POST["contactfield3"]; // ---------"ditto"---------- $contactfield4=$_POST["contactfield4"]; // ---------"ditto"---------- $email_from = ""; $email_subject = "" ; //$email_txt = ""; $email_to = "drtech001@gmail.com"; $email_message = "field1: $contactfield1\n field2 :$contactfield2 \n field3 :$contactfield3 \n field4 : $contactfield4 \n "; mail($email_to, $email_subject, $email_message, $email_from); ?> If all's good ... then @deeem I was thinking the same thing, that the contactfields are probably hardcoded to the software, so those can't be changed... only the variables assigned to them can be changed. As I had said, I just followed some sample form scripts online and modified accordingly, but it does make sense to leave them as is, as there's no harm done. I guess the code was right since you left most of it intact, except for the missing semi-colons ... missed that! I'll paste the code and test it. Thx deeem. @shadiadiph Woooah! That's one helluva long script .... altho I notice a lot of HTML tagging in there. But I'll keep it and go over it ... maybe use it when I'm not using this software or using a more scripted way of building future websites. @farkewie Thx 4 the input.
  2. 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 generated 'as is' by the software in that 'contact.php' file : <? $contactfield1=$HTTP_GET_VARS["contactfield1"] $contactfield2=$HTTP_GET_VARS["contactfield2"] $contactfield3=$HTTP_GET_VARS["contactfield3"] $contactfield4=$HTTP_GET_VARS["contactfield4"] $email_from = "you@yourdomain.com"; $email_subject = "" ; //$email_txt = ""; $email_to = "info@yourdomain.com"; $email_message = "field1: $contactfield1\n field2 :$contactfield2 \n field3 :$contactfield3 \n field4 : $contactfield4 \n "; mail($email_to, $email_subject, $email_message,$email_from); ?> 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 = "[b]my email id here[/b]"; $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 (excellent software btw, the site I created only came to <500kb!!!). 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 the code requires any proper formatting (as some lines in the script seem to me to be out of place), then pls provide that too. Image Link : PS. In case anyone's interested, the site can be found at this link http://visitmyspace.sitegoz.com/ <br>Don't use the contact form tho .... just need that damn script to work first !
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.