Forums

ASP

This topic is locked

Can't get my PHP/form to work

Posted 30 Sep 2007 22:26:54
1
has voted
30 Sep 2007 22:26:54 jessica wallis posted:
I can't get my form to work its for rrtitle.net/index-8.html.
I have never done this before and got a company to make the form pages on the website but they didn't put the form action tags or make a submit page. Someone helped me with whats below for the submit.php, but i must be doing something wrong.
COULD SOMEONE HELP ME MAKE IT SEND TO ME ANY WAY????
I'm seriously in a bind

Submit.php:

<?php
// Requested posts, there is case sensitive in PHP!

// Purchaser/Borrower Info
$B_first_name = $_REQUEST['B_first_name'];
$B_last_name = $_REQUEST['B_last_name'];
$B_phone = $_REQUEST['B_phone'];
$B_email = $_REQUEST['B_email'];
$B_closing_date = $_REQUEST['B_closing_date'];

// Property Info
$D_address_1 = $_REQUEST['D_address_1'];
$D_address_2 = $_REQUEST['D_address_2'];
$D_description = $_REQUEST['D_description'];
$D_county = $_REQUEST['D_county'];
$D_price = $_REQUEST['D_price'];

// Borrower's Mortgage Lender
$G_company = $_REQUEST['G_company'];
$G_loan_officer = $_REQUEST['G_loan_officer'];
$G_loan = $_REQUEST['G_loan'];
$G_phone = $_REQUEST['G_phone'];

// Seller Info
$C_first_name = $_REQUEST['C_first_name'];
$C_last_name = $_REQUEST['C_last_name'];
$C_phone = $_REQUEST['C_phone'];
$C_email = $_REQUEST['C_email'];

// Listing Agent
$E_company = $_REQUEST['E_company'];
$E_name = $_REQUEST['E_name'];
$E_phone = $_REQUEST['E_phone'];

// Selling Agent
$F_company = $_REQUEST['F_company'];
$F_name = $_REQUEST['F_name'];
$F_phone = $_REQUEST['F_phone'];

// Requesting finishes

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// Connect to SMTP Server
$smtp_server = "mail.webhostasp.com";
$port = 25; // smtp port default 25
$mydomain = "teknobper.com";
$username = " ";
$password = "I TOOK THIS OUT";
$sender = " ";
$recipient = " ";
$subject = "Hello";
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// Content

$content = "
<table width=380 border=0 cellpadding=0 cellspacing=0>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Purchaser/Borrower Info</td>
</tr>
<tr>
<td width=51%>First Name</td>
<td width=49%>$B_first_name</td>
</tr>
<tr>
<td>Last Name</td>
<td>$B_last_name</td>
</tr>
<tr>
<td>Phone</td>
<td>$B_phone</td>
</tr>
<tr>
<td>Email</td>
<td>$B_email</td>
</tr>
<tr>
<td>Closing Date</td>
<td>$B_closing_date</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Property Info</td>
</tr>
<tr>
<td>Address</td>
<td>$D_address_1</td>
</tr>
<tr>
<td>City, State, Zip</td>
<td>$D_address_2</td>
</tr>
<tr>
<td>Property Description</td>
<td>$D_description</td>
</tr>
<tr>
<td>County</td>
<td>$D_county</td>
</tr>
<tr>
<td>Price</td>
<td>$D_price</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Borrower's Mortgage Lender</td>
</tr>
<tr>
<td>Company Name</td>
<td>$G_company</td>
</tr>
<tr>
<td>Loan Officer Name</td>
<td>$G_loan_officer</td>
</tr>
<tr>
<td>Loan Amount</td>
<td>$G_loan</td>
</tr>
<tr>
<td>Phone</td>
<td>$G_phone</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Seller Info</td>
</tr>
<tr>
<td>First Name</td>
<td>$C_first_name</td>
</tr>
<tr>
<td>Last Name</td>
<td>$C_last_name</td>
</tr>
<tr>
<td>Phone Number</td>
<td>$C_phone</td>
</tr>
<tr>
<td>Email</td>
<td>$C_email</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Listing Agent</td>
</tr>
<tr>
<td>Company Name</td>
<td>$E_company</td>
</tr>
<tr>
<td>Listing Agent Name</td>
<td>$E_name</td>
</tr>
<tr>
<td>Phone</td>
<td>$E_phone</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Selling Agent</td>
</tr>
<tr>
<td>Company Name</td>
<td>$F_company</td>
</tr>
<tr>
<td>Selling Agent Name</td>
<td>$F_name</td>
</tr>
<tr>
<td>Phone</td>
<td>$F_phone</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
</table>";

////////////////////////////////////////////////////////////////////////////////////////////////////////////

// SMTP connection
$handle = fsockopen($smtp_server, $port);
fputs($handle, "EHLO " . $mydomain . "\r\n";

// SMTP authorization
fputs($handle, "AUTH LOGIN\r\n";
fputs($handle, base64_encode($username)."\r\n";
fputs($handle, base64_encode($password)."\r\n";

// Send out the e-mail
fputs($handle, "MAIL FROM:<" . $sender . ">\r\n";
fputs($handle, "RCPT TO:<" . $recipient . ">\r\n";
fputs($handle, "DATA\r\n";
fputs($handle, "To: " . $recipient . "\n";
fputs($handle, "Subject: " . $subject . "\n\n";
fputs($handle, "Content-type: text/html; charset=iso-8859-1" . "\n\n";
fputs($handle, $content . "\r\n";

fputs($handle, ".\r\n";

// Close connection to SMTP server
fputs($handle, "QUIT\r\n";
?>




<html>
<body>
<table width=380 border=0 cellpadding=0 cellspacing=0>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Summary</td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Purchaser/Borrower Info</td>
</tr>
<tr>
<td width=51%>First Name</td>
<td width=49%><?php echo $B_first_name; ?></td>
</tr>
<tr>
<td>Last Name</td>
<td><?php echo $B_last_name; ?></td>
</tr>
<tr>
<td>Phone</td>
<td><?php echo $B_phone; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $B_email; ?></td>
</tr>
<tr>
<td>Closing Date</td>
<td><?php echo $B_closing_date; ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Property Info</td>
</tr>
<tr>
<td>Address</td>
<td><?php echo $D_address_1; ?></td>
</tr>
<tr>
<td>City, State, Zip</td>
<td><?php echo $D_address_2; ?></td>
</tr>
<tr>
<td>Property Description</td>
<td><?php echo $D_description; ?></td>
</tr>
<tr>
<td>County</td>
<td><?php echo $D_county; ?></td>
</tr>
<tr>
<td>Price</td>
<td><?php echo $D_price; ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Borrower's Mortgage Lender</td>
</tr>
<tr>
<td>Company Name</td>
<td><?php echo $G_company; ?></td>
</tr>
<tr>
<td>Loan Officer Name</td>
<td><?php echo $G_loan_officer; ?></td>
</tr>
<tr>
<td>Loan Amount</td>
<td><?php echo $G_loan; ?></td>
</tr>
<tr>
<td>Phone</td>
<td><?php echo $G_phone; ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Seller Info</td>
</tr>
<tr>
<td>First Name</td>
<td><?php echo $C_first_name; ?></td>
</tr>
<tr>
<td>Last Name</td>
<td><?php echo $C_last_name; ?></td>
</tr>
<tr>
<td>Phone Number</td>
<td><?php echo $C_phone; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $C_email; ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Listing Agent</td>
</tr>
<tr>
<td>Company Name</td>
<td><?php echo $E_company; ?></td>
</tr>
<tr>
<td>Listing Agent Name</td>
<td><?php echo $E_name; ?></td>
</tr>
<tr>
<td>Phone</td>
<td><?php echo $E_phone; ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td height=20 colspan=2 bgcolor=#CCCCCC>Selling Agent</td>
</tr>
<tr>
<td>Company Name</td>
<td><?php echo $F_company; ?></td>
</tr>
<tr>
<td>Selling Agent Name</td>
<td><?php echo $F_name; ?></td>
</tr>
<tr>
<td>Phone</td>
<td><?php echo $F_phone ?></td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
</table>
</body>
</html>

Reply to this topic