Jump to content

[SOLVED] PHP Baby with Gray Hair


skent_ns

Recommended Posts

I am an oldster :-[ who is just now trying out PHP and MySql, with my first project.  After doing a fair amount of research and trying to go it alone with a form, and getting nowhere I decided to download PHPMailer which appeared to offer the opportunity to fix my errors.  I am sorry to say it didn't.  I realize my problem is probably something very simple, but I can't see the problem.  If anybody is willing to take a look at the problem for me, you can see my two pages at http://www.martock.ca/enquiry/, and there is a link on the first page to a zipped file containing the files I have created and which are causing my problem.

 

The zipped files have been saved with path information, and I have PHPMailer installed in /lib/phpmailer/ of website folder.

 

The problem does not involve MySql, it is a supposedly straight forward form which should then be emailed on clicking the submit button.  The results page should then appear confirming that the email has been sent and showing the information entered and sent.  But when I click the Submit button, all I get is a blank page and no email.  As I have had problems with setting up Apache, I am using a commercial site to experiment with this problem.

 

I am not sure what they are using for hardware, but I do know they are using Apache, Linux and PHP 5.  My own system is a P4 3.00Ghz, 1 GB Memory, 500 GB Hard Drive with 40% free space.  I am using Windows XP Pro with SP2 and Dreamweaver MX 2004, with Bradbury TopStyle for design.

 

I have also downloaded Xampp and I am trying to set it up, but have hit a snag with Apache, although I think I know what the problem is.

 

So anybody with the patience of Job and willing to assist a frustrated oldster, please let me know.  Your help would be gratefully appreciated.

 

??? Kipper in Nova Scotia, Canada.

Link to comment
Share on other sites

A blank screen is often due to a syntax error.  Have you set display_errors to 1?

 

display_errors and other error reporting related directives are listed here:

 

http://sg2.php.net/manual/en/ref.errorfunc.php

 

You can set it in php.ini, or you can try ini_set('display_errors', 1);.  ini_set() will only work for errors that occur after the script starts executing (ie, not syntax errors).

 

Remember to switch it off once the site is working properly, otherwise it may reveal details about your script to others.

Link to comment
Share on other sites

Many Thanks btherl

 

Your suggestion with the ini_set allowed to find out that I had used a relative address that wasn't working, but after changing it to an absolute address it worked fine.  So I just have to figure out why the results webpage looks great, but the HTML Email shows up with all the tags as Text.

 

Thanks again for the help.  Love the fast suggestion.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.