Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 23-04-2009
Member
 
Join Date: Oct 2008
Posts: 27
Php Contact form help

Hey.. I have created this form with my brother but it does not work. Can you help me?
Code:
<? php 

$ subject = 'Results from Contact form'; 

$ emailadd = 'info@xdc-c.com'; 

$ url = 'xdc-c.com/Virker-ikke-endu; 

$ req ='0 '; 

$ text = "Results from form: \ n \ n"; 
$ space = ''; 
$ line = ' 
'; 
foreach ($ _POST as $ key => $ value) 
( 
if ($ req =='20 ') 
( 
if ($ value =='') 
(echo "$ key is empty"; die;) 
) 
$ j = strlen ($ key); 
if ($ j> = 20) 
(echo "Name of form element $ key can not be longer than 20 characters"; die;) 
$ j = 20 - $ j; 
for ($ i = 1; $ i <= $ j, $ i + +) 
($ space .= '';) 
$ value = str_replace ( '\ n', $ line, $ value); 
$ conc = "($ key): $ space ($ value) $ line"; 
$ text .= $ conc; 
$ space = ''; 
) 
mail ($ emailadd, $ subject, $ text, 'From:'. $ emailadd .''); 
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; 
?>
Reply With Quote
  #2  
Old 23-04-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Php Contact form help

What error message does it give? I can see a few things that could give rise to a suspicion of error, but I could just imagine a little more precise error description.
Reply With Quote
  #3  
Old 23-04-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: Php Contact form help

Parse error: syntax error, unexpected T_LNUMBER in / mounted-storage/home72b/sub001/sc41874-UOCY/xdc-c.com/contacthaha.php on line 9
Reply With Quote
  #4  
Old 23-04-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: Php Contact form help

Code:
$emailadd = 'info@xdc-c.dk'; 

$url = 'xdc-c.dk/Virker-ikke-endu; 

$req ='0 ';
The middle line is missing a quotation mark at the end.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Php Contact form help"
Thread Thread Starter Forum Replies Last Post
how to delete unidentified contact names in my window live account contact list that does not belong to me Mick41 Technology & Internet 2 03-05-2012 06:44 PM
How to synchronize Facebook contact from contact list of Motorola Droid 3 Genna Portable Devices 6 17-07-2011 11:03 AM
Google Chrome is opening in basic HTML form instead of the Standard form Beatrix Technology & Internet 5 25-05-2011 10:21 PM
Need contact form in php CossFire Software Development 1 29-06-2009 07:27 PM
How to create a contact form using HTML and PHP Mahendra varma Software Development 3 15-05-2009 06:24 PM


All times are GMT +5.5. The time now is 08:51 PM.