PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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:
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?
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]
New development, originally i have Mozilla as my default browser however when i open the html file in IE and click the button, it asks me if i want to open or save the php file.
and save it as test.php, place it in the document root and access the file through browser. If it gives some output with php information, then your php works. otherwise you need to add few lines in httpd.conf file
Yes, your php doesnt work. I suggest you to download the xampp which takes just few minutes to install and setup complete LAMP environment. If you dont want to try new things then Open your httpd.conf file and add
few lines
No, search for AddType and place it below them, and replace the DirectoryIndex with the following suggested. Also check for LoadModule has added php or not., if not you need to do that too
Ok added everything you've said. Nothing seems to have worked
Downloaded XAMPP and installed. All services running. Still get the "Do you want to open or save the file?" box. Added the extra lines into the conf file and still getting this.
MattCollins wrote:Have done that but as soon as i double click the file it asks me to open or save again
The webserver(and php) has to process the file. You have to request it via http://localhost instead of double-clicking it in the windows (file) explorer.