Results 1 to 20 of 20

Thread: Assistance with a form
      
   

  1. #1
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Assistance with a form

    Hello all I have created a template which I learned from this post http://www.vodahost.com/vodatalk/blu...ge-bv-php.html which is great but I think I have taken it a step to far and hit a problem.

    The template I created contains a form and now appears on all the other pages along with the other elements which are common.

    When testing this form, it doesn't return me to the success page. It takes me to an error page where the url is that of the page where I filled the form in. If you don't mind testing you will see what I mean. I do however get the messages dropping into my mailbox.

    I have also created a seperate form in contactus and this works fine.

    If someone can have a look that'll be great.

    Thanks in advance

    Darren
    Happy Building

    DarrenC

  2. #2
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

  3. #3
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Happy Building

    DarrenC

  4. #4
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    Well I got this when I hit the submit button.........

    Warning: Cannot modify header information - headers already sent by (output started at /home/acmnfasq/public_html/dcwebsolutions.co.uk/index.php:7) in /home/acmnfasq/public_html/dcwebsolutions.co.uk/dcwebtemplate.php on line 125

    Where and with what did you create the form ?

    It looks as if you have used an html box or copied some code into the page html because you have 2 sets of this:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Untitled Page</title>
    <meta name="GENERATOR" content="Created by BlueVoda">
    <style type="text/css">

  5. #5
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Thanks for taking a look David

    It all started when i studied this post for menus http://www.vodahost.com/vodatalk/blu...ge-bv-php.html

    I quickly realised that I could add other elements at the same time so as well as a nav menu, i could include a logo and so on. Include the little bit of coding on to the page and save as menu.php or whatever (In my case i've called it dcwebtemplate.php)

    For all the other pages i just opened a html and pasted the code to find dcwebtemplate.php when published.

    Always has worked well in the past because if I need to change a common element, be it a logo, nav menu or whatever - I just need to do it once as you know.

    I just thought I would see if I could take it one step and see if I could include a form.

    I can't see why it won't work, I say scratching my head.

    Darren
    Happy Building

    DarrenC

  6. #6
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    .... sorry David, I didn't answer your question. i created the form in BV as I did with the contact page (which works OK)
    Happy Building

    DarrenC

  7. #7
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    Quote Originally Posted by DarrenC View Post
    .... sorry David, I didn't answer your question. i created the form in BV as I did with the contact page (which works OK)
    I only asked the above question because you can get a different answer between using the form wizard and ABVFP.

  8. #8
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Quote Originally Posted by davidundalicia View Post
    I only asked the above question because you can get a different answer between using the form wizard and ABVFP.
    I made the form manually but I did tick the check box for using the built in PHP form processer and changed the encoding type to multipart/ form data.

    Darren
    Happy Building

    DarrenC

  9. #9
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    Go back to the form and leave the action field blank.
    You are using the old action.php which has now been superceeded.

    See this sample form (scroll down a little) for the correct entries in the form wizard.

  10. #10
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    David my form looks just like yours in the tutorial. The only thing that was different was the encoding type. I had multipart/ form and yours says application/x-www.......

    So I've tried both now but I still get the same error.

    Happy Building

    DarrenC

  11. #11
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    I know there is a '/' missing in the success url, but I have put that right to no avail.

    Darren
    Happy Building

    DarrenC

  12. #12
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    The multi part thing is just for upload fields......

    Change the link to the success page and error pages as shown on the sample form:
    i.e. just enter success.html and error.html

    Am off to bed now..........good morning. (its 3am here)

  13. #13
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Thanks for all your help David - Goodnight

    I've tried what you've suggested but still does not work. i don't think I can include a form in the manner that I have done it. My first post, where I mentioned Navals post which I have been following seems to be OK for nav menus and other elements but I think to include a form as well might be pushing it and is causing some kind of conflict.

    Darren
    Happy Building

    DarrenC

  14. #14
    Karen Mac's Avatar
    Karen Mac is offline General
    Join Date
    Apr 2006
    Location
    X marks the spot
    Posts
    8,353

    Default Re: problem with a form - please help

    Thats exactly it... you are conficting two scripts.

    Karen

    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  15. #15
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Quote Originally Posted by Karen Mac View Post
    Thats exactly it... you are conficting two scripts.

    Karen
    Yes it was what I thought.

    I've got it working now by copying and pasting the form to each page. Not the way I wanted to do it but hey - it works.

    Darren
    Happy Building

    DarrenC

  16. #16
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    Glad you got a working form now.

    Note: If done properly then you can use navals single menu, form, etc as long as your contact form(php script) has a different name.

    There is no reason why you cannot have 2 or more forms(php scripts) on a page as long as the form name is changed because logically you can only press one submit button at a time.

  17. #17
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Quote Originally Posted by davidundalicia View Post
    Glad you got a working form now.

    Note: If done properly then you can use navals single menu, form, etc as long as your contact form(php script) has a different name.

    There is no reason why you cannot have 2 or more forms(php scripts) on a page as long as the form name is changed because logically you can only press one submit button at a time.
    Thanks for your time and attention David.

    I totally agree with your comments as I have used 2 or more php scripts in the past with no problems. As an after thought, this morning, I created a seperate script for just this form, but oddly it still didn't work.

    Never mind, I've got it working using the conventional way.

    Thanks again

    Darren
    Happy Building

    DarrenC

  18. #18
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

    Default Re: problem with a form - please help

    If you care to send me the 2 or 3 BV pages that were involved, I would like to have a look and see if this problem can be avoided by other users.

    You can get my email from here:

  19. #19
    DarrenC's Avatar
    DarrenC is offline Brigadier General
    Join Date
    Jul 2008
    Location
    Bristol UK
    Posts
    1,756

    Default Re: problem with a form - please help

    Sorry David I've deleted those pages now
    Happy Building

    DarrenC

  20. #20
    Join Date
    Mar 2006
    Location
    Mallorca, Spain
    Posts
    6,313

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49