Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formmail please help 1

Status
Not open for further replies.

tdong

Programmer
Mar 12, 2004
112
CA
this one doesn't work. all I did was get a row from the database and echo the recipient email. both page source in IE are identical any one have any idea ? thanks


this one work

<input type=hidden name="recipient" value="<? echo $row['email']; ?>"> the different is the mail.php contain this the send I enter the email in there
<input type=hidden name="recipient" value="tuvinhdong@yahoo.ca">

Thanks a bunch
 
The last time I checked, formmail was a perl script, not a PHP script.

Anyway, it's very difficult to advise you by only examining the frontend.



Want the best answers? Ask the best questions! TANSTAAFL!
 
source code. the one what works is without the php code

<html> <head> <title>Form Mail</title> </head>

<body bgcolor="#FFFFFF" text="#000000"> <form name="form1" method="post" action="/cgi/formmail">

<?php
include 'broker/dbconnection.php';
$query = "select * from brokers where custom_id = 'tdong'";
$result = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_array($result);
?>
<input type=hidden name="recipient" value="<? echo $row['email']; ?>">

<input type=hidden name="subject" value="Form Mail Results">

<input type=hidden name="required" value="fullname,email">

<input type=hidden name="redirect" value="/cgi/formmail">

Name<br><input type=text name="fullname"><br>

Email<br> <input type=text name="email"><br>

<br> Comments<br> <textarea name="comments"></textarea> <br>

<br> <input type="submit" name="Submit" value="Submit">

</form>

</body> </html>
 
<input type=hidden name="recipient" value="<? echo $row['email']; ?>"> if I enter static email it work. it is perl code but it is used for php to send email submit form. it is support by php
 
or do you know any php email code around ? all I need is for user to enter name , email address and a small message and send the info to brokers mailboxes
 
As an aside, you're running a very old version of formmail. The author strongly recommends upgrading to the new version, 1.91, because it plugs several spam-related security holes.

I'm also not sure why you're using formmail at all. PHP can send mail, too.


I see only three differences in the output: two instances where one output has blank lines and the other does not and a missing hidden form field. The only thing I see that is significant is the hidden form field.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top