ahazin Posted January 22, 2008 Share Posted January 22, 2008 As im looking at webhosts now and my website has some php in it which includes the mail function where the user fills in a form and then when the submit button is pressed the form gets sent to my email address. In regards to buying a server i know it needs to allow php but does it matter if it simply has PHP or PHP5? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/ Share on other sites More sharing options...
trq Posted January 22, 2008 Share Posted January 22, 2008 php5 is the current version of php, anything older is out of date. php4 reached the end of its life at the begining of this year. Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/#findComment-446069 Share on other sites More sharing options...
ahazin Posted January 22, 2008 Author Share Posted January 22, 2008 so i wud need php5 to allow my fourm to send then? Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/#findComment-446075 Share on other sites More sharing options...
tapos Posted January 22, 2008 Share Posted January 22, 2008 Yeah. PHP-5 is simply great. -- Thanks, Tapos Pal http://tapos.wordpress.com Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/#findComment-446086 Share on other sites More sharing options...
ahazin Posted January 24, 2008 Author Share Posted January 24, 2008 So basically both these hosting options:http://www.fasthosts.co.uk/hosting/ and http://www.easyspace.com/starter_hosting.php will support this section of php: <?php $to = "lucealmighty@hotmail.co.uk"; $subject = "Contact Us"; $name_field = $_REQUEST['name_field'] ; $email_field = $_REQUEST['email_field'] ; $message = $_REQUEST['message'] ; $headers = "From: $email_field"; $body = "Name: $name_field \n E-Mail: $email_field \n Message:\n $message"; $sent = mail($to, $subject, $body, $headers) ; if(!eregi("[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}",$email_field)) print ("<br><br><br><br><p align=\"center\"><strong><font face=\"Verdana, Arial, Helvetica, sans-serif\" font color = \"#FFFFFF\">Invalid E-Mail address please correct the error and try again.</strong></font>"); else if($sent) {print ("<br><br><br><br><p align=\"center\"><strong><font face=\"Verdana, Arial, Helvetica, sans-serif\" font color = \"#FFFFFF\">Your message was sent successfully</strong></font>"); } else {print ("<br><br><br><br><p align=\"center\"><strong><font face=\"Verdana, Arial, Helvetica, sans-serif\" font color = \"#FFFFFF\">We encountered an error sending your message. Please try again or call us on 07802 414985</strong></font>"); } ?> Thanks in advance. Really appreciate the help i got through these fourms. Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/#findComment-447667 Share on other sites More sharing options...
runnerjp Posted January 24, 2008 Share Posted January 24, 2008 yup they will but why not use http://bigwetfish.co.uk/ 10.99 a year Quote Link to comment https://forums.phpfreaks.com/topic/87209-simple-question/#findComment-447691 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.