contact - send to formmail after initial php checks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MrMagooba

    contact - send to formmail after initial php checks

    Hi, I have a contact page that, when submit is clicked it checks the inputs
    then outputs to a "read only" version of the input form fromwhich the email
    can be sent.
    How would I go about changing the script so when the submit button is
    clicked, it'll check, and if it passes the requirements, it'll be sent (to
    the formmail script)?

    You can see my coding at:

    (it's a bit rough! and don't worry about the $expa/b stuff - that's there
    for a seperate reason)

    Thanks

    --
    Luck is a skill I am yet to acquire!!



  • Mike M

    #2
    Re: contact - send to formmail after initial php checks

    MrMagooba wrote:
    [color=blue]
    > Hi, I have a contact page that, when submit is clicked it checks the
    > inputs then outputs to a "read only" version of the input form fromwhich
    > the email can be sent.
    > How would I go about changing the script so when the submit button is
    > clicked, it'll check, and if it passes the requirements, it'll be sent (to
    > the formmail script)?
    >
    > You can see my coding at:
    > http://www.mattyjones.co.uk/testing/...ntact/main.inc
    > (it's a bit rough! and don't worry about the $expa/b stuff - that's there
    > for a seperate reason)
    >
    > Thanks
    >[/color]

    Hi

    I've made a couple of changes to your script, you can take a look at


    I strongly recommend that you change your code from using $email to
    $_GET['email'],
    http://nz.php.net/manual/en/language...predefined.php and the
    security sections document why :-)

    HTH
    Mike

    Comment

    • MrMagooba

      #3
      Re: contact - send to formmail after initial php checks

      > MrMagooba wrote:[color=blue]
      >[color=green]
      > > Hi, I have a contact page that, when submit is clicked it checks the
      > > inputs then outputs to a "read only" version of the input form fromwhich
      > > the email can be sent.
      > > How would I go about changing the script so when the submit button is
      > > clicked, it'll check, and if it passes the requirements, it'll be sent[/color][/color]
      (to[color=blue][color=green]
      > > the formmail script)?
      > >
      > > You can see my coding at:
      > >[/color][/color]
      http://www.mattyjones.co.uk/testing/...ntact/main.inc[color=blue][color=green]
      > > (it's a bit rough! and don't worry about the $expa/b stuff - that's[/color][/color]
      there[color=blue][color=green]
      > > for a seperate reason)
      > >
      > > Thanks
      > >[/color]
      >
      > Hi
      >
      > I've made a couple of changes to your script, you can take a look at
      > http://www.mike-mac.gen.nz/meetakiwi/Documents/main.inc
      >
      > I strongly recommend that you change your code from using $email to
      > $_GET['email'],
      > http://nz.php.net/manual/en/language...predefined.php and the
      > security sections document why :-)[/color]

      Thanks for the *tweaking* - it shall be used :-). But it still posts
      the -passed- original input into a read only form for the user to click the
      submit button. What I want to do is, if the inputted details passes my
      tests, send the mail, not display in a read only version for the user to
      click the submit button again. I really want to use PHPFormMail to send the
      mail as it is tried and tested, but at the moment I am scouring the 'net for
      mail() tut's so I can replace the read only form with a send mail routine.


      Comment

      Working...