Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submit button not working when used as image? (PHP form, IE issue)

    Hello,

    I've modified this PHP Tell a Friend script:

    http://www.php-learn-it.com/php_scri...nd_script.html

    Here is my version:

    http://kittentaboo.com/yeskidzcan/tell_a_friend.php

    The submit image is not working in Internet Explorer (I'm testing in 7). If I use the standard submit button instead of an image, it works fine. Both versions work fine in Firefox. See this version:

    http://kittentaboo.com/yeskidzcan/te...l_a_friend.php

    Whyyyyy? I'm sure I sound picky, but I think my submit image looks much nicer and I would prefer to use that over the canned button...

    Thanks for any input.
    Last edited by jenny_jane; 10-21-2009 at 10:51 PM. Reason: Forgot to mention it works fine in Firefox.

  • #2
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fixed!

    My friend helped me fix this. We were able to find the answer here:

    http://www.webmasterworld.com/forum88/4894.htm

    Needed to change this line:

    PHP Code:
    if(isset($_POST["submit"])) 
    To this:

    PHP Code:
    if(isset($_POST["submit"]) || isset($_POST["submit_x"])) 

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,111
    Thanks
    2
    Thanked 326 Times in 318 Posts
    All browsers send the submit_x variable for an image button, so you only need to use -

    PHP Code:
    if(isset($_POST["submit_x"])) 
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the input!

  • #5
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    It's good to see someone actually inform us -- and future generations -- of the solution after solving the issue on your own. On countless occasions I've seen a member ask a question and after figuring it out two seconds later they totally disregard anyone who may have the same issue in the future and replace the original question with "solved. plz delete this".


  •  

    Posting Permissions

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