Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: PHP email form

  1. #1
    Join Date
    Oct 2006
    Posts
    41
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default PHP email form

    Hi there,

    I'm currently trying to use Dago Designs email script.

    I have a page and on there I wanted to have the actual form to fill out.

    However I understand I need to create a php file, so I did, the script is as follows and the file is jointheclub3.php:

    This script requires you to download the files and upload them onto your server, there is a css file and a php file. The php file I made some changes to as required:

    Code:
    $standalone = 'http://www.mysite.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.css;
    
    // If you are using the standalone option, enter the relative path to your CSS file so it  
    // can be declared properly in the header
    
    $path_to_css = 'http://www.mysite.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.css';
    
    // For those of you including this script in another PHP file, be sure to manually
    // add the CSS declaration in the header section of your page:
    //   <link rel="stylesheet" href="(location of dd-formmailer.css)" type="text/css" media="screen" />
    
    // LANGUAGE SETTING 
    // The relative path to the language file you want to use.
    
    $language = 'lang/English.php';
    
    // FULL URL TO SCRIPT
    // The full URL to dd-formmailer.php (or whatever you have renamed it to)
    
    $script_path = 'http://www.mysite.ca/jointheclub3.php';
    
    // FULL URL TO CONTACT PAGE
    // If you are running this script in standalone mode, leave this blank. Otherwise,
    // enter the full URL to the page that is displaying the form
    
    $path_contact_page = '';
    
    // RECIPIENT DATA
    // If you are just sending email to a single address, enter it here. For more advanced
    // usage such as multiple recipients, CC, BCC, etc.. please see the web page for instructions
    
    $recipients = 'whatever@yahoo.com';
    
    // FORM STRUCTURE
    // This is used to generate the form. Each form element must be on its own line.
    // Detailed usage instructions can be found on the web page
    
    $form_struct = '
    	type=text|class=fmtext|label=First Name|fieldname=fm_firstname|max=100|req=true
            type=text|class=fmtext|label=Last Name|fieldname=fm_lastname|max=100|req=true
    	type=text|class=fmtext|label=Address|fieldname=fm_address|max=100|req=true
       	type=text|class=fmtext|label=Home Phone|fieldname=fm_phonehome|max=100|req=true
    	type=text|class=fmtext|label=Cell Phone|fieldname=fm_phonecell|max=100|req=true
    	type=text|class=fmtext|label=Email|fieldname=fm_email|max=100|req=true|ver=email
    	type=text|class=fmtext|label=Subject|fieldname=fm_subject|max=100|req=true
    	type=verify|class=fmverify|label=Verify
    	type=textarea|class=fmtextarea|label=Message|fieldname=fm_message|max=1000|rows=6|req=true
    ';
    Now I can't for the life of me get this to work. The php page I created doesn't work, and even if it did, how do it get it on the html page? Or do I not?
    Last edited by vacatia; 04-30-2008 at 01:06 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Your problem should be right here:
    PHP Code:
    $standalone 'http://www.grillmasters.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.css; 
    Which should be:
    PHP Code:
    $standalone 'http://www.grillmasters.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.css'
    You forgot your single quote.
    And, no, you cannot put it on your HTML page.
    Jeremy | jfein.net

  3. #3
    Join Date
    Oct 2006
    Posts
    41
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi there,

    Ok I fixed that quote, thanks!

    Now if I can't put it on an html page, on my website I have to put a link to my php page right? The page I'm trying to get the script to show up on is jointheclub3.php and it's giving me all these weird errors still, even after fixing that quote

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Can I please see your errors? That may help.
    Also make sure that you have all access to include the file, make sure you can access it from your browser, and make sure that your settings in php.ini are right, for more information go here: http://www.dynamicdrive.com/forums/s...73&postcount=3
    Jeremy | jfein.net

  5. #5
    Join Date
    Oct 2006
    Posts
    41
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Sure thing, when I go to www.mysite.ca/jointheclub3.php I see this:

    Code:
    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /var/www/vhosts/grillmasters.ca/httpdocs/jointheclub3.php on line 8
    
    Warning: include(http://www.mysite.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.php) [function.include]: failed to open stream: no suitable wrapper could be found in /var/www/vhosts/mysite.ca/httpdocs/jointheclub3.php on line 8
    
    Warning: include() [function.include]: Failed opening 'http://www.grillmasters.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.php' for inclusion (include_path='.:') in /var/www/vhosts/mysite.ca/httpdocs/jointheclub3.php on line 8
    The actual code I have on jointheclub3.php is:


    <!-- \/ starthtml --><HTML><HEAD><TITLE>The Grilling Club - Join Now</TITLE>

    <link rel="stylesheet" href="http://www.mysite.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.css" type="text/css" media="screen" />
    </HEAD>


    <?php include('http://www.mysite.ca/dd-formmailer[1]/dd-formmailer/dd-formmailer.php'); ?>



    <!-- /\ end html --></FONT></BODY></HTML>
    Last edited by vacatia; 04-30-2008 at 01:07 AM.

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Check my edit above.
    Quote Originally Posted by Nile
    Also make sure that you have all access to include the file, make sure you can access it from your browser, and make sure that your settings in php.ini are right, for more information go here: http://www.dynamicdrive.com/forums/s...73&postcount=3
    Jeremy | jfein.net

  7. #7
    Join Date
    Oct 2006
    Posts
    41
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi Nile,

    Where do I find the php.ini file? I don't see anything like that

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Are you hosting the site yourself (on your own server), or do you go through a webhost? If the latter, then you will need to contact your host and try to convince them to change the settings. Other than that, you are out of luck.

    Edit: Instead of assigning absolute paths, why not use relative paths in the script. So basically, instead of having http://your-site you would have this: /path/to/file.


    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Oct 2006
    Posts
    41
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hey there,

    I"m on someone else's server. So he should be able to access the php.ini file?

  10. #10
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    He may, he may not. It depends if he knows how. But probably the answer is Yes.
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •