Jump to content

I need help with a contact form soo bad! There must be a saviour in my time of n


Recommended Posts

:-[

 

Hi guys, ive currently finished editing a flash template and im stuck on a part i assumed would be easy...the contact form.

 

Im sooo desperate to get this contact form on my flash website and i just cant figure out what i have to do nxt to get it working. Ive been on hundreds of websites to try and figure it out, and cant still cant understand why i keep getting errors, a few suggested it may have some thing to do with a smtp? Im a newbie at this so, really have no idea what that means or how to do it. I was using a default script from

http://info.template-help.com/after_sale_support/Working_with_Flash/Advanced/article7.html because i dont know how to make one myself. Ive followed the instructions exactly but im still getting anhialated by error messages when i test it online.

 

Id appreciate any help you could give me! Im even willing to pay for the help. This really is the last thing standing in the way of me putting the site online.

 

 

Im not sure what information you might need to help me out so i'll include everything i can.

 

- In flash mx on the 'reset' button contains the following actionscript: -

 

on(rollOver){

this.gotoAndPlay("s1");

}

 

on(rollOut, releaseOutside){

this.gotoAndPlay("s2");

}

 

on(release) {

//_parent.t1_2=";

_parent.company="Your Company:";

_parent.name="Your Name:";

_parent.phone="Your Phone:";

_parent.email="Your Email:";

_parent.message="Your Message:";

}

 

- The 'submit' button contaisn the following actionscript: -

 

on(rollOver){

this.gotoAndPlay("s1");

}

 

on(rollOut, releaseOutside){

this.gotoAndPlay("s2");

}

 

on(rollOver){

this.gotoAndPlay("s1");

}

 

on(rollOut, releaseOutside){

this.gotoAndPlay("s2");

}

 

on(release) {

//_parent.t1_2="";

_parent.getURL("contact.php","_blank","get");

_parent.company="Your Company:";

_parent.name="Your Name:";

_parent.phone="Your Phone:";

_parent.email="Your Email:";

_parent.message="Your Message:";

}

 

- Finally, the code im using for the contact.php is below, is there something missing thats preventing it from working?

 

<?php

 

    $your_company = $_GET['company];

    $your_name = $_GET['name'];

    $your_phone = $_GET['phone'];

    $your_email = $_GET['email'];

    $your_message = $_GET['message'];

   

    $recipient_email = "info@darkiconstudios.com";

   

$subject = "from " . $your email;

$headers = "From: " . $your_name . " <" . $your_email . ">\n";

    $headers .= 'Content-type: text/html; charset=iso-8859-1';

   

    $content = "<html><head><title>Contact letter</title></head><body><br>";

    $content .= "Company: <b>" . $your_company . "</b><br>";

    $content .= "Name: <b>" . $your_name . "</b><br>";

    $content .= "Phone: <b>" . $your_phone . "</b><br>";

    $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";

    $content .= $your_message;

    $content .= "<br></body></html>";

 

  mail($recipient,$subject,$content,$headers);

?>

<html>

    <body bgcolor="#282E2C">

        <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">

            Your message was sent. Thank you.

        </div>

    </body>

</html>

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

 

The errors that occur when i click submit is -

 

Parse error: parse error, unexpected T_STRING in e:\domains\p\pavelockstudios.com\user\htdocs\contact.php on line 11

 

 

Thanks alot for taking the time to read it, i know its probably a pain for you to recieve newbie things like this but you guys seem like the right people to speak to. If someone could tlel me where im goin wrong (in simple terms) and how to put it right and get the contact form running, id be forever grateful.

 

 

Many, many thanxs. Alex. :D:D:D

Thankyou soo much for the fastest reply ever! I put the underscore in there so it read: -

 

            $recipient_email = "info@darkiconstudios.com";

   

$subject = "from " . $your_email;

$headers = "From: " . $your_name . " <" . $your_email . ">\n";

            $headers .= 'Content-type: text/html; charset=iso-8859-1';

 

However instead of the previous error it now reads: -

 

Notice: Undefined variable: recipient in e:\domains\p\pavelockstudios.com\user\htdocs\contact.php on line 23

 

Warning: mail() [function.mail]: SMTP server response: 554 Error: no valid recipients in e:\domains\p\pavelockstudios.com\user\htdocs\contact.php on line 23

 

Your message was sent. Thank you.

 

 

What do you recon esukf? Any ideas? Thanks again.

 

 

can anyone help? The code in the first post still applies (with corrections from the last post)

 

Am i using the wrong code to get this contact form working? is there something missing from it that stops it from working?

 

Appreciate all help. Many thanxs.

 

Chigley you are the man, cant thank you enough. No errors, ive been waiting for this moment for sooo long!

 

However, theres a new problem now:  -

 

When i upload everything to my ftp server, and click on the wbsite, everything runs smoothly. When i clear the contact form cells, they reset themselves which is great, however when i fill out the cells and click send, the message window does come up saying 'Thankyou your message was sent' (with no errors YAY :D) but i recieve no message in my email account when i ckeck it afterwards. I waited 10mins to see if perpahps it had gone astray, but nothing....lol

 

Its like the message is getting lost in the vastness of the internet.

 

How can i check thats its even working?

 

Many many thanxs!

 

 

In a separate file on the same server make a file with this in it:

 

<?php

mail("youremail@domain.com", "Test Email", "Testing...");

?>

 

Replace the email in it and run the file. If you don't get the email, you need to contact your host about SMTP.

 

Chigley

What should i make the file in? Do i make a new .php file with just that code it? If so what should i call it? and how should i run it to test.

 

Sorry man, im a serious newbie to this whole thing. Thanxs soo much.

ha ha excellent, thankyou, when you say type in the URL and run the file, does that mean just visit my site online and send an email again? lol Cos if thats the case i did it perfect! :D

 

I opened a new php document, pasted the code in. Saved it as test.php, uploaded it to the server through the ftp server and then visted my site on IE. I filled out the boses, click submit and it said "thankyou your email was sent' again..but still nothing in the inbox...lol

 

Thanks chigley

 

 

What chigley means is that..

 

First, make a blank file named test.php and save it.

Then, put ONLY this code in the file:

<?php

mail("youremail@domain.com", "Test Email", "Testing...");

?>

 

After you've done that, go to test.php. You shouldn't get any messages at all. Check your e-mail.

Im not sure if tits the same thing but on my account i have avaiable to me the following details: - my SMTP server settings, my SMTP username, and smtp port. Are any of those helpful.

 

theres also a FAQ just beneath titled 'Sendmail functions' which is a little bit too perfect.

 

its says: -

 

What is the path to Sendmail?

 

/usr/sbin/sendmail -fuser\@domainname.co.uk

 

You need to replace -fuser\@domainname.co.uk with a valid mailbox on your account:

ie -froot\@yourdomain.co.uk

 

You must leave in the -f and make sure there is a \ before the @

 

Please note when sending email from a script on your website either the to or from address needs to be a valid email account that is setup, eg root@yourdomain.co.uk

 

 

I have no idea what i would do with this though? I understand how to apply my email address to it

 

so it would be: - e.g -finfo\@darkiconstudios.co.uk

 

but what would i do with this new address?

 

Thanxs chigley, dunno what id have done if you wernt here. lol

 

http://us2.php.net/manual/en/function.mail.php

 

Sorry I didn't read the first page, but it shoulds like you are trying to figure out how to add the -f part. Here is the code:

 

<?php
// bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )
mail('nobody@example.com', 'the subject', 'the message', null,
   '-fwebmaster@example.com');

?>

 

Hope that helps.

Oh rite, ok, so do i just insert that into the contact.php file i made? Does it matter where it goes? Do i only need to change the '-fwebmaster@example.com'); so that it applies to mine? or are there other sections i should change aswell!

 

so the new version would look like this?

 

<?php

// bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )

mail('nobody@example.com', 'the subject', 'the message', null,

   '-finfo@darkiconstudios.com');

 

?>

 

 

Many thanxs  ;D

Change everything that is relevant, if you do not change the subject or message part than that is what the email will send. The null is the mailheaders, sometimes those help quite extensively.

 

I suggest read the usercomments / examples found on the mail function url I posted above.

God im soo confused, and its not because of you. Ive done soo much over the last 24 hours to get this working, each time its different.

 

Im soo unsure about what id need to be editing im sure i'll make more problems for myself if i change anything.

 

If i show you the exact code on my contact.php could you suggest which parts need to be changed a what to?

 

 

The 'contact.php' code is -

 

<?php

 

    $your_company = $_GET['company'];

    $your_name = $_GET['name'];

    $your_phone = $_GET['phone'];

    $your_email = $_GET['email'];

    $your_message = $_GET['message'];

   

    $recipient_email = "info@darkiconstudios.com";

   

$subject = "from " . $your_email;

$headers = "From: " . $your_name . " <" . $your_email . ">\n";

    $headers .= 'Content-type: text/html; charset=iso-8859-1';

   

    $content = "<html><head><title>Contact letter</title></head><body><br>";

    $content .= "Company: <b>" . $your_company . "</b><br>";

    $content .= "Name: <b>" . $your_name . "</b><br>";

    $content .= "Phone: <b>" . $your_phone . "</b><br>";

    $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";

    $content .= $your_message;

    $content .= "<br></body></html>";

 

  mail($recipient_email,$subject,$content,$headers);

 

?>

<html>

    <body bgcolor="#282E2C">

        <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">

            Your message was sent. Thank you.

        </div>

    </body>

</html>

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

 

 

 

If you were to insert the code you gave me and adjust the variables it to the above settings how would you do that? Is there anyway you could rewrite the above with the new code and changes. Im just too scared to change anything and make more errors because of my lack of knowledge.

 

Thanks ever soo much, Alex  :)

 

 

 

<?php

    $your_company = $_GET['company'];
    $your_name = $_GET['name'];
    $your_phone = $_GET['phone'];
    $your_email = $_GET['email'];
    $your_message = $_GET['message'];
   
    $recipient_email = "info@pavelockstudios.com";
   
   $subject = "from " . $your_email;
   $headers = "From: " . $your_name . " <" . $your_email . ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
   
    $content = "<html><head><title>Contact letter</title></head><body>
";
    $content .= "Company: " . $your_company . "
";
    $content .= "Name: " . $your_name . "
";
    $content .= "Phone: " . $your_phone . "
";
    $content .= "E-mail: " . $your_email . "

";
    $content .= $your_message;
    $content .= "
</body></html>";

     mail($recipient_email,$subject,$content,$headers, "-finfo@darkiconstudios.co.uk");

?>
<html>
    <body bgcolor="#282E2C">
        <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
            Your message was sent. Thank you.
        </div>
    </body>
</html>
<script>resizeTo(300, 300)</script>

 

Try that

Thanxs man, even that works perfectly, says 'message sent' but i still get no email come through.

 

I noticed in that code the email addresses id given were both different. that was an accident. They are both meant to be info@darkiconstudios.com.

 

What you recon? Could there be any other reasons why im recieving nothing?

 

<?php

    $your_company = $_GET['company'];
    $your_name = $_GET['name'];
    $your_phone = $_GET['phone'];
    $your_email = $_GET['email'];
    $your_message = $_GET['message'];
   
    $recipient_email = "info@pavelockstudios.com";
   
   $subject = "from " . $your_email;
   $headers = "From: " . $your_name . " <" . $your_email . ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
   
    $content = "<html><head><title>Contact letter</title></head><body>
";
    $content .= "Company: " . $your_company . "
";
    $content .= "Name: " . $your_name . "
";
    $content .= "Phone: " . $your_phone . "
";
    $content .= "E-mail: " . $your_email . "

";
    $content .= $your_message;
    $content .= "
</body></html>";

     mail($recipient_email,$subject,$content,$headers, "-finfo@darkiconstudios.com");

?>
<html>
    <body bgcolor="#282E2C">
        <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
            Your message was sent. Thank you.
        </div>
    </body>
</html>
<script>resizeTo(300, 300)</script>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.