Results 1 to 6 of 6

Thread: L'il PHP problem

  1. #1
    Decaf
    Join Date
    Apr 2004
    Location
    Nottingham, UK
    Posts
    24

    L\'il PHP problem

    Hi all

    I have a contact page on my website which has a link to an online form which (opens in a new window) mail details to me. The PHP mailer works fine but I would like, after pressing "submit", that the online form window closes and a specified page opens in the "main browser".

    Basically what I need is, user clicks "online form" from contact page, online form opens up in new smaller window, user enters info and presses "submit", the details are mailed to me (does all of this already), THEN the online form window closes and a specified page loads in the main browser window.

    This is probably simple but I'm a bit of a PHP novice! I can paste the code I already have if that helps

    Cheers
    Charlie.

  2. #2
    You could put the mail script and form on the same page then just have the form call itself, check for a post variable, if it exist then do the send mail.

    Or you can use header(link:"http://www.whatever.com") to have the page redirect once it is done processing.

  3. #3
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    - moved -

  4. #4
    Decaf
    Join Date
    Apr 2004
    Location
    Nottingham, UK
    Posts
    24
    Thanks for the reply.

    I have already used a header to redirect the page but I want to close the form and redirect the main browser to a new page?

    Any ideas?

    Thanks
    Charlie.

  5. #5
    Programming Ninja mkeefe's Avatar
    Join Date
    Feb 2003
    Location
    Boston
    Posts
    7,794
    what chowmein was suggesting was NO POPUP, but instead have a page on your main site. Most users have popup blockers

    -matt

  6. #6
    Regular
    Join Date
    Jan 2005
    Location
    Little Britain
    Posts
    435
    and php doesnt like opening and closing pages much

    why do you need to open it in a new window and close the old one anyway? just use the same one

Posting Permissions

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