Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Web form help

Options
2»

Comments

  • Registered Users Posts: 413 ✭✭ianhobo




  • Registered Users Posts: 413 ✭✭ianhobo


    is he running the page from his open dreamweaver design or from a freshly uploaded copy each time?

    if he's just pressing "preview" in dreamweaver, and processing/sending the form from his local preview, he might have a valid referer to reference......


  • Registered Users Posts: 706 ✭✭✭DJB


    that should happen but on the OP's computer, he's not getting that!

    I can't figure it out as it is requesting servervariables so should be browser/user independent!


  • Registered Users Posts: 706 ✭✭✭DJB


    he's going to the site and clicking send. i just talked to him and we walked through it! it's not a cache as I did an "hello world" response.write at top of script and that worked fine!

    This one is baffling me!!!!


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    DJB wrote: »
    that should happen but on the OP's computer, he's not getting that!

    I can't figure it out as it is requesting servervariables so should be browser/user independent!

    Is it still not reading a value from the browser, so it's not really 100% server side?

    I don't see why that code is there at all anyway?


  • Advertisement
  • Registered Users Posts: 3,056 ✭✭✭sticker


    For what its worth, I restarted PC / modem / cleared cache / entered the site through a safe link in google - and I'm still seeing nothing onscreen when I click send!

    To be honest, if it's working for you guys - ie IS working - I'll live with my rig being a little temperamental!

    It's bizzare all the same!


  • Registered Users Posts: 706 ✭✭✭DJB


    Your right. It's pointless really! I've commeted it out and it should be working fine now then.

    Let me know!


  • Registered Users Posts: 413 ✭✭ianhobo


    the code is there to simply prevent any one sending data to the script for email processing.

    it says to itself:
    "did the data i just recieve come from my own domain (or another allowed domain as per line 54?). Ah, yes if did i'll just process it an send it on, we dont want any spam here!" :)


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    ianhobo wrote: »
    the code is there to simply prevent any one sending data to the script for email processing.

    it says to itself:
    "did the data i just recieve come from my own domain (or another allowed domain as per line 54?). Ah, yes if did i'll just process it an send it on, we dont want any spam here!" :)

    But if someone accesses that page directly, it won't work because there is no referer.

    A better way to check that the page was executed on their own domain would be to use

    Request.ServerVariables("Servername") or "HTTP_HOST".


  • Registered Users Posts: 3,056 ✭✭✭sticker


    DJB wrote: »
    Your right. It's pointless really! I've commeted it out and it should be working fine now then.

    Let me know!

    Are you happy that the form is operational now to info@summerhillspares.ie then David?


  • Advertisement
  • Registered Users Posts: 413 ✭✭ianhobo


    Because its a general free script, it is a simple security measure used to prevent the form accepting and processing email from random people. Like me at my computer here

    but based on what you said eoin, it was probably originally designed to be used as a central processing script for several websites/domains


  • Registered Users Posts: 706 ✭✭✭DJB


    I'm happy it is working but it doesn't check who is posting to it, that's all. I don't know why your machine is different but it works now.

    If you start getting spam through it than maybe look at putting a new script in but for now, it should be fine. Send a test and contact your client.


  • Registered Users Posts: 3,056 ✭✭✭sticker


    I've just been on to the client - all tests are working - thanks so much David and everyone for the help today!!

    Much appreciated... ;)


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    ianhobo wrote: »
    Because its a general free script, it is a simple security measure used to prevent the form accepting and processing email from random people. Like me at my computer here

    but based on what you said eoin, it was probably originally designed to be used as a central processing script for several websites/domains

    Sorry - I was thinking about this the wrong way. If the HTTP_REFERER method is used after the form submission, then it should indeed work - regardless of where the user came from before visiting the contact page.

    However, due to the lack of indenting on the source, and the length of the script itself, it's hard to tell if the request to the server variables collection is being made at the right time.


  • Registered Users Posts: 413 ✭✭ianhobo


    eoin_s wrote: »
    However, due to the lack of indenting on the source, and the length of the script itself, it's hard to tell if the request to the server variables collection is being made at the right time.

    Correct,
    any HTTP variable that are wanted should be the very first thing done.

    Same if your writing a response script.
    You have to do your cookies first thing, before the response object is fully constructed, and any http body data is added (the html or other)


  • Registered Users Posts: 3,056 ✭✭✭sticker


    I just heard back from the client - it would appear the form is still not working properly

    Here's his email:

    Meant to mention the other day that the automated reply thats sent to customers (after they've filled in the parts request form)is now arriving at my inbox. E-mails are still arriving at the correct address,

    Anyone any ideas...?

    Thanks


  • Registered Users Posts: 413 ✭✭ianhobo


    hey,
    yep, your sending it to yourself
    Line ten of your html <input name="recipient" id="summerhill......
    this value with name recipient is supposed to be the email address of the person who filled in the form, not yours. you should be from and sender

    change line 10 from:
    <input name="recipient" value="info@summerhillspares.ie" type="hidden">
    
    to
    <input name="email" value="info@summerhillspares.ie" type="hidden">
    

    and change line 29(ish) from:
    <input name="EmailAddress" id="EmailAddress2" type="text">
    

    to
    <input name="recipient" id="EmailAddress2" type="text">
    

    try that, then use the form by filling in your own email address and see if you get an email!
    If not, post back here saying what heppend.
    I hope its right, its very early and im still half asleep!!!!


  • Registered Users Posts: 3,056 ✭✭✭sticker


    Thanks ianhobo...

    Although the client is now telling me:

    The 'parts request' mail is now arriving at my personal e-mail and no sign of the 'auto reply'


    I'm not familiar with coding - I'm happy to give temporary ftp access to remedy this problem...


  • Registered Users Posts: 413 ✭✭ianhobo


    hmmm ok , i may have got that wrong! can make ftp connections from my location at the moment,
    so I the mean time just undo those last changes, at least that was half working


  • Registered Users Posts: 413 ✭✭ianhobo


    ianhobo wrote: »
    hey,
    yep, your sending it to yourself

    Your supposed to be, well to summerhillsspares email address :) sorry :(


  • Advertisement
  • Registered Users Posts: 3,056 ✭✭✭sticker


    ianhobo wrote: »
    hmmm ok , i may have got that wrong! can make ftp connections from my location at the moment,
    so I the mean time just undo those last changes, at least that was half working

    Can you PM me when you get the chance later and I'll give you FTP access...

    It'd be SERIOUSLY appreciated mate!!

    I'm just a little out of my depth with this coding!

    Thanks


  • Registered Users Posts: 3,056 ✭✭✭sticker


    ianhobo wrote: »
    hmmm ok , i may have got that wrong! can make ftp connections from my location at the moment,
    so I the mean time just undo those last changes, at least that was half working

    I've undid the changes you asked - let me know if you could do some ftp'ng later

    Thanks


Advertisement