NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Why the HELL won't this work ??????

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 07-30-2004, 03:23 AM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 2,725
will7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud of
 



Why the HELL won't this work ??????


I am getting really annoyed with PHP lately. I have wrote the code for a mail form using php and it won't work. Here is the code:

PHP Code:
<?php
$subj
="FusionCre8 Starter Package order";
$to="wills_ebay@msn.com";
$msg="Name: ".$_POST['fname']." ".$_POST['lname']." \r \n Company/Site Name: ".$_POST['compname']." \r \n E-Mail Address: ".$_POST['email2']." \r \n Number of pages: ".$_POST['pno']." \r \n Number of graphics: ".$_POST['gno']." \r \n Hosting: ".$_POST['host']." \r \n Domain Name: ".$_POST['domname']." ".$_POST['domext']." \r \n About the site: ".$_POST['about']." \r \n Further Information: ".$_POST['furtinfo']." \r \n";
$header="From: ".$_POST['fname']." ".$_POST['lname'];
mail($to$subj$msg$header);
header("Location: startthanks.htm");
?>
And, if you need it, here is the HTML for my form (it's quite long):

Quote:
<form name="form2" method="post" action="startmail.php">
<table width="501" cellspacing="0" cellpadding="0" class="text02" height="423">
<tr>
<td class="text02" height="30" width="134">First Name:</td>
<td class="text02" height="30" width="365">
<input type="text" name="fname"class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Last Name:</td>
<td class="text02" height="30" width="365">
<input type="text" name="lname" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Name of Site\Company:</td>
<td class="text02" height="30" width="365">
<input type="text" name="compname" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">E-Mail Address:</td>
<td class="text02" height="30" width="365">
<input type="text" name="email2" class="form">
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Number of pages:</td>
<td class="text02" height="30" width="365">
<select name="pno" class="form">
<option>-- Please Select --</option>
<option>1 page</option>
<option>2 pages</option>
<option>3 pages</option>
<option>Don't know</option>
</select>
</td>
????: NamePros.com http://www.namepros.com/programming/41106-why-the-hell-wont-this-work.html
</tr>
<tr>
<td class="text02" height="31" width="134">Number of graphics:</td>
<td class="text02" height="31" width="365">
<select name="gno" class="form">
<option>-- Please Select --</option>
<option>1 graphic</option>
<option>2 graphics</option>
<option>3 graphics</option>
<option>4 graphics</option>
<option>5 graphics</option>
<option>Don't know</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Hosting:</td>
<td class="text02" height="30" width="365">
<select name="host" class="form">
<option>-- Please Select --</option>
????: NamePros.com http://www.namepros.com/showthread.php?t=41106
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="30" width="134">Required domain
name:</td>
<td class="text02" height="30" width="365">www.
<input type="text" name="domname" class="form">
<select name="domext" class="form" style="width: 60px">
<option>.com</option>
<option>.co.uk</option>
<option>.org</option>
<option>.org.uk</option>
<option>.net</option>
<option>.biz</option>
<option>.info</option>
</select>
</td>
</tr>
<tr>
<td class="text02" height="95" valign="top" width="134">What
is your site about:</td>
<td class="text02" height="95" width="365" valign="top">
<textarea name="about" class="form" style="height: 80px; width: 200px"></textarea>
</td>
</tr>
<tr>
<td class="text02" height="48" valign="top" width="134">Further
information:</td>
<td class="text02" height="48" width="365" valign="top">
<p>
<textarea name="furtinfo" class="form" style="height: 80px; width: 200px"></textarea>
</p>
<p align="left">
<input type="submit" name="Submit" value="Order" class="form" style="width: 50px">
<input type="reset" name="Submit3" value="Reset" class="form" style="width: 60px">
</p>
</td>
</tr>
</table>
</form>
Well, any ideas?
will7 is offline  
Old 07-30-2004, 03:45 AM   #2 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




Quote:
Originally posted by will7
????: NamePros.com http://www.namepros.com/showthread.php?t=41106
I have wrote the code for a mail form using php and it won't work
Could you explain more how it doesn't work ? Do you have any error message ? Just not receive mail ? Etc.

It's possible your host turn off the mail function usage.

Thanks,
David.
dgaussin is offline  
Old 07-30-2004, 04:14 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 2,725
will7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud of
 



It says error on line 5.

The exact error?

Quote:
Parse error: parse error in /home/www/will7.thefreebizhost.com/startmail.php on line 5
And before you ask, it is a free host but it supports PHP and all functions - apparently...
__________________
Will Narburgh | Graphic design | Twitter | Email me
will7 is offline  
Old 07-30-2004, 04:33 AM   #4 (permalink)
Senior Member
 
dgaussin's Avatar
Join Date: May 2004
Location: France
Posts: 1,226
dgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to beholddgaussin is a splendid one to behold
 




Not sure it helps, but maybe could you try to add a newline in the header...

$header="From: ".$_POST['fname']." ".$_POST['lname']." \r \n";
dgaussin is offline  
Old 07-30-2004, 05:10 AM   #5 (permalink)
RJ
NamePros Admin


 
RJ's Avatar
Join Date: Feb 2003
Posts: 12,919
RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness
 



Find Marrow Donors! Cystic Fibrosis Parkinson's Disease
Works fine for me, will. Not sure what's different about your host's PHP setup. Maybe they have disabled something?

http://www.namepros.com/321/0/
__________________
Reach me at rj at namepros dot com
RJ is offline  
Old 07-30-2004, 06:16 AM THREAD STARTER               #6 (permalink)
Senior Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 2,725
will7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud of
 



That code works fine?

Dodgy. I think it might be a problem with my host - it's free, after all...
__________________
Will Narburgh | Graphic design | Twitter | Email me
Last edited by will7; 07-30-2004 at 06:18 AM.
will7 is offline  
Old 07-30-2004, 06:33 AM   #7 (permalink)
Senior Member
Join Date: Apr 2004
Posts: 1,189
e39m5 is a jewel in the roughe39m5 is a jewel in the roughe39m5 is a jewel in the rough
 



welll, once you get your host straightened out, but in a code so you cant email nothing with blank fields
e39m5 is offline  
Old 07-30-2004, 06:37 AM THREAD STARTER               #8 (permalink)
Senior Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 2,725
will7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud ofwill7 has much to be proud of
 



Weird. It works and I get the mail and everything. I think it could be my host. I'll see what options I have...
__________________
Will Narburgh | Graphic design | Twitter | Email me
will7 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:25 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger