Having trouble making PHP work.
Posted: Tue Jan 30, 2007 3:17 am
feyd | Please use
and it gets the data from a very simple html file with a submission form. I have changed the e-mail address in the mail("yourname@example.com", "Feedback Form Results", line to my own e-mail address however nothing appears to be happening.
Do i need to enable any services or should they all have started automatically? Anyone have any ideas?
Many thanks,
Matt Collins
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Ok, i am very, very new to PHP. Infact this is my first attempt to use it. I have downloaded and installed both MySQL, PHP 5.2.0 and Apache 2.2. I pointed the PHP installer to the Apache configuration files and it updated those successfully. However when i come to write a php file (e.g. sendmail.php) all i get is a blank page when it loads. the code i have in there is something i copied and pasted from a tutorial and is:Code: Select all
<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "yourname@example.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>Do i need to enable any services or should they all have started automatically? Anyone have any ideas?
Many thanks,
Matt Collins
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]