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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Php reply 2

Status
Not open for further replies.

cissilya

IS-IT--Management
Feb 15, 2005
42
US
how come i can not get my reply page to come back with the URL

Script
"
<html>
<head>
<title>Form Result</title>
<body>
<?php
// Send
mail('computerceal@gmail.com', 'Information', $message);
/*This page receives and handles the data generated by "contacts.htm".*/
$var1 = $_POST['fname'] ;
$var2 = $_POST['lname'] ;
$var3 = $_POST['email'] ;
$var4 = $_POST['comments'] ;

$messagebody =
"Information Results:\n----------------------------------------\n
First Name:$var1\n\n
Last Name:\n$var2\n\n
E-Mail:\n$var3\n\n
Comments:\n$var4";
mail('computerceal@gmail.com', 'user info', $messagebody);
print ("Your submission has been received! To return to the home page please click-$Array[http:\\www.edusult.com]-\n ");
?>
</body>
</html>
 
well it still does not show up as a hyperlink, which is what i am trying to get it to do. do you have any suggestions?
 
when i have it in the following form i get the hyperlink but for some reason when you click on the link it doubles up on the site that its going to.

<?php
{
$mailto = 'cissilya@yahoo.com';
$subject = 'Client Information';
/*This page receives and handles the data generated by "contacts.htm".*/
$var1 = $_POST['fname'] ;
$var2 = $_POST['lname'] ;
$var3 = $_POST['email'] ;
$var4 = $_POST['comments'] ;
$var5 = $_POST['url'];

$messagebody =
"Information Results:\n----------------------------------------\n
First Name:$var1\n\n
Last Name:\n$var2\n\n
E-Mail:\n$var3\n\n
Comments:\n$var4";
mail($mailto, $subject, $messagebody);
print ('Your entry has been received, to return to the home page click <a href="http:\\exit;
}
?>

does anyone know why

Thank you
 
cissilya,

This is the view source of the returned page:

Code:
Your entry has been received, to return to the home page click <a href="http:\[URL unfurl="true"]www.edusult.com">Home</a>[/URL]

Looks like you may need to escape like:
Code:
print ('Your entry has been received, to return to the home page click <a href="http:\\\\[URL unfurl="true"]www.edusult.com">Home</a>');[/URL]

Thanks,
Lrnmore
 
try this:
Code:
<?php

$mailto = 'cissilya@yahoo.com';
$subject = 'Client Information';

/*This page receives and handles the data generated by "contacts.htm".*/
$var1 = $_POST['fname'] ;
$var2 = $_POST['lname'] ;
$var3 = $_POST['email'] ;
$var4 = $_POST['comments'] ;
$var5 = $_POST['url'];

$messagebody = 
"Information Results:\n----------------------------------------\n
First Name:$var1\n\n
Last Name:\n$var2\n\n
E-Mail:\n$var3\n\n
Comments:\n$var4";

mail($mailto, $subject, $messagebody);

print ("Your entry has been received, to return to the home page click <a href=\"[URL unfurl="true"]http://www.edusult.com\">Home</a>");[/URL]

?>

Regards,

Martin

Computing Help And Info:
 
My Bad!

Try forward slashes...

Code:
print ('Your entry has been received, to return to the home page click <a href="[URL unfurl="true"]http://www.edusult.com">Home</a>');[/URL]

Thanks,
 
last question is there a way of putting in multiple mail to email addresses in this script?

Thank you
 
yes.

try this:
Code:
<?php

$mailto = 'cissilya@yahoo.com,email@email.com,etc@etc.com';
$subject = 'Client Information';

/*This page receives and handles the data generated by "contacts.htm".*/
$var1 = $_POST['fname'] ;
$var2 = $_POST['lname'] ;
$var3 = $_POST['email'] ;
$var4 = $_POST['comments'] ;
$var5 = $_POST['url'];

$messagebody = 
"Information Results:\n----------------------------------------\n
First Name:$var1\n\n
Last Name:\n$var2\n\n
E-Mail:\n$var3\n\n
Comments:\n$var4";

mail($mailto, $subject, $messagebody);

print ("Your entry has been received, to return to the home page click <a href=\"[URL unfurl="true"]http://www.edusult.com\">Home</a>");[/URL]

?>

just seperate email address's with a comma

Regards,

Martin

Computing Help And Info:
[URL unfurl="true"]http://www.webrevolt.biz[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top