Please post here anything else (not relating to Maxwell technical matters)
#182889
My mom's website is a combination of a very old flash anymation and a even older html site.

I pretty much did the whole mess (website) myself, execpt for one thing.... the contact form.

The contact form was done by somebody (who I won't be able to contact...) with black magic

He made the contact form in html
http://www.tereschubert.com/tereform.html

and then, he created a "cgi-bin" folder with this file
http://www.tereschubert.com/help/teremail.cgi (<- this is not the actual folder, as I can't link the folder )


Simple enough, I was asked by my mom to change the contact form to something more simple.... (she wanted to have only three things: Name, e-mail, comments)

So I gave it my best, and modefied the tereform.html... unfortunately the thing would not send the e-mail because it was missing the wedding date (which is a required field in the old form). So I went ahead and modified the teremail.cgi

Next time I tried the form....whoa!! error!!

So I decided to place back the old files to make the form work again, but even putting the old files back I keep getting the same error when I try to send the form........ WHY?????

Can somebody offer me a solution? :shock: My mom need a working form.

leo
Sorry for the long post
User avatar
By Mihai
#182891
Can your server run php? is it ok if the form data is sent to her email directly, or does it have to be stored in a database?
User avatar
By Leonardo
#182914
Mihai wrote:Can your server run php?
I have no clue if it runs php... how can I find out?
is it ok if the form data is sent to her email directly, or does it have to be stored in a database
We only need the form to work, if you can make it work directly... It will be fine with me :D
User avatar
By Thomas An.
#182924
Leonardo wrote:if you can make it work directly... It will be fine with me :D
That would be $300, payable to Mihai (paypal prefered, but I think he might take a check too). :P
User avatar
By michaelplogue
#182926
Mom's gonna be sooooo pissed........ :shock: :wink:

(Deny everything. It's your only way out!)
User avatar
By MarkM
#182935
Hi Leo,
One thing that comes to mind is…what are the CHMOD settings for the cgi files? Maybe something as simple as that.
Leonardo wrote: I have no clue if it runs php... how can I find out?
I would go to your web hosting company page and see if its listed there or you could run this script (or any php script in this matter to see if it works) that will give you some useful information.

phpinfo.php
Code: Select all
<?php
phpinfo();
?>

To get you up and running now heres a sample html form and php code…

html code
Code: Select all
<form method="POST" action="/contactconfirm.php">
        <p align="center">&nbsp;</p>
        <p align="center"><b><font size="2" face="Verdana">Email Address: <input type="text" name="from" size="31" style="border: 1 solid #000000"></font></b></p>
        <p align="center"><b><font size="2" face="Verdana">Subject: <input type="text" name="subject" size="33" style="border: 1 solid #000000"></font></b></p>
        <p align="center"><b><font size="2" face="Verdana">Message:</font></b></p>

<center>
<p align="center"><textarea rows="11" name="note" cols="46"></textarea></p>
<p align="center"><input type="submit" value="Submit" name="B1">
<input type="reset" value="Clear" name="B2"></p>
        </form>

php code....

name the file contactconfirm.php and put it in the same directory your form file is in...Also change YOUR_EMAIL@ADDRESS.COM to the email address you want the form to send to…
Code: Select all
<?php
/* this pages recives and handles the data from contact.php
*/

$note = $note; 
$from = $from;
$to = "YOUR_EMAIL@ADDRESS.COM"; 
$subject = $subject; 
$message = $note; 
$headers = "MIME-Version: 1.0\n";   

                        $headers .= "Content-Type: text/html; charset=iso-8859-1\n";   

                        $headers .= "X-MSMail-Priority: Normal\n";   

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

                        $headers .= "Reply-To: <$from>\n"; 

// Filter out email injection
if ((preg_match('/\\\[rn]/i', $from)) || (preg_match('/\\\[rn]/i', $subject))) {
   die("<center><b><font size=3 color=#000000>Spammers not welcome! If you believe you received this error incorrectly then please email us at $to </center></font></b>"); 
}else{
mail( $to, $subject, $message, $headers) and print "<b><font size=3 color=#000000> Thank you your email has been received. You should receive a reply soon from one of our representatives.</font></b>" or print "<b><font size=5> Could not send try again</font></b>"; 
}
?>
Let me know how this works out for you or if you need any help getting it to work. :wink:

Regards,
Mark
User avatar
By Leonardo
#183042
This is good stuff... I'll try it, as soon as I get a chance


leo
User avatar
By Leonardo
#183046
Oh... yes!!! it's working, now my mom will love me again

leo
User avatar
By Leonardo
#183100
I'm back,
I need to refine a little more the contact form (My mom will not let me go this easy)

This is what I need...
example e-mail:
FROM: somebody@somewhere.com

SUBJECT: "Tere Contact Form" (Automate Subject... all e-mails coming from the contact form will have the same subject)

MESSAGE:
"Name:" (New input from a text field)
"Phone:" (New input from a text field)
"Email:" (same input from: "FROM" )
"Message:" (Message = note)

Sorry for being a pain :oops:
leo
User avatar
By MarkM
#183111
Hey your no pain… glad I can help :)
ok give this a try we can refine it a little better if needed…I’m on my way out the door so I didn’t have time to make it nicer…but when I come back I’ll see were your at.


Cheers,
Mark
Code: Select all
<form method="POST" action="contactconfirm.php"> 
        <p align="center">&nbsp;</p> 
        <p align="center"><b><font size="2" face="Verdana">Name: <input type="text" name="name" size="33" style="border: 1 solid #000000"></font></b></p> 
		<p align="center"><b><font size="2" face="Verdana">Phone Number: <input type="text" name="phone" size="33" style="border: 1 solid #000000"></font></b></p> 
		<p align="center"><b><font size="2" face="Verdana">Email Address: <input type="text" name="from" size="31" style="border: 1 solid #000000"></font></b></p> 
                <p align="center"><b><font size="2" face="Verdana">Message:</font></b></p> 

<center> 
<p align="center"><textarea rows="11" name="note" cols="46"></textarea></p> 
<p align="center"><input type="submit" value="Submit" name="B1"> 
<input type="reset" value="Clear" name="B2"></p> 
        </form> 
Code: Select all
<?php 
/* this pages recives and handles the data from contact.php 
*/ 
$name = $name;
$phone = $phone;
$note = $note; 
$from = $from; 
$to = "YOUR_EMAIL@ADDRESS.COM"; 
$subject = "Tere Contact Form"; 
$message = "$name<br>$phone<br>$from<br><br>$note"; 
$headers = "MIME-Version: 1.0\n";    

                        $headers .= "Content-Type: text/html; charset=iso-8859-1\n";    

                        $headers .= "X-MSMail-Priority: Normal\n";    

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

                        $headers .= "Reply-To: <$from>\n"; 

// Filter out email injection 
if ((preg_match('/\\\[rn]/i', $from)) || (preg_match('/\\\[rn]/i', $subject))) { 
   die("<center><b><font size=3 color=#000000>Spammers not welcome! If you believe you received this error incorrectly then please email us at $to </center></font></b>"); 
}else{ 
mail( $to, $subject, $message, $headers) and print "<b><font size=3 color=#000000> Thank you your email has been received. You should receive a reply soon from one of our representatives.</font></b>" or print "<b><font size=5> Could not send try again</font></b>"; 
} 
?>
User avatar
By Leonardo
#183159
Thanks a lot .... I got it working just the way I needed


leo

ok thanks for explaining. actually I do copy the T[…]

Sketchup 2026 Released

Fernando wrote: " Now that Maxwell for Cinema[…]

Hello Gaspare, I could test the plugin on Rhino 8[…]

Hello Blanchett, I could reproduce the problem he[…]