Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP page/file for this form?
Old 01-28-2008, 06:41 AM Re: PHP page/file for this form?
Ultra Talker

Posts: 316
Trades: 0
Parse error: syntax error, unexpected T_ECHO in mail.php on line 16
Joe3000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-28-2008, 01:30 PM Re: PHP page/file for this form?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
wait a sec just looked when and why did u add echo in the mail func?

PHP Code:
<?php
@extract($_POST);
$name stripslashes($name);
$email stripslashes($email);
$subject stripslashes(Reflexology);
$telephone stripslashes($telephone);

$text $telephone;
$text .= stripslashes($text);
$text .= "\n\n IP Address: " $_SERVER['REMOTE_ADDR'];
  if (
$_SERVER['HTTP_X_FORWARDED_FOR']) 
  {
  
$text .= " or Proxy Reports: " $_SERVER['HTTP_X_FORWARDED_FOR'];
  }
$text .=  "\n\nUser Agent: " stripslashes($_SERVER['HTTP_USER_AGENT']);
mail('x@gmail.com'$subject,$text,"From: $name <$email>");
header("location:mailsent.htm"); 
?>
</SPAN>
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 01-28-2008, 01:47 PM Re: PHP page/file for this form?
rion's Avatar
Experienced Talker

Posts: 31
Name: Rion
Location: Portland, Oregon
Trades: 0
It's printing the telephone twice because of this:

PHP Code:
$text $telephone;
$text .= stripslashes($text); 
change to this

PHP Code:
$text stripslashes($telephone); 
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by rion; 01-28-2008 at 01:48 PM.. Reason: used $text instead of $telephone in the fixed code..
rion is offline
Reply With Quote
View Public Profile Visit rion's homepage!
 
Old 01-28-2008, 01:58 PM Re: PHP page/file for this form?
rion's Avatar
Experienced Talker

Posts: 31
Name: Rion
Location: Portland, Oregon
Trades: 0
Actually....I didn't look at all of the code at first...just change the whole thing to this:

PHP Code:
 <?php
@extract($_POST);
$name stripslashes($name);
$email stripslashes($email);
$subject stripslashes(Reflexology);
$telephone stripslashes($telephone);

$text $telephone;
$text .= "\n\n IP Address: " $_SERVER['REMOTE_ADDR'];
  if (
$_SERVER['HTTP_X_FORWARDED_FOR']) 
  {
  
$text .= " or Proxy Reports: " $_SERVER['HTTP_X_FORWARDED_FOR'];
  }
$text .=  "\n\nUser Agent: " stripslashes($_SERVER['HTTP_USER_AGENT']);
mail('x@gmail.com'$subject,$text,"From: $name <$email>");
header("location:mailsent.htm"); 
?>
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by rion; 01-28-2008 at 01:59 PM.. Reason: edited PHP tagss
rion is offline
Reply With Quote
View Public Profile Visit rion's homepage!
 
Old 01-29-2008, 07:28 AM Re: PHP page/file for this form?
Ultra Talker

Posts: 316
Trades: 0
Cool.

Its only showing the phone number once but is not showing what I typed in the message text box.

Any ideas?

Thanks.
Joe3000 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP page/file for this form?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48203 seconds with 11 queries