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 7 of 7

Thread: Submit Form

  1. #1
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Submit Form

    Hello,

    I have a web page which people can post their messages on it. Now for some reasons, I cannot submit a message to the website.

    When I click on the the link below which it should submit the form data to the website. So I can click on the next step(button) to confirm and submit it.

    Here is the URL: http://www.uswebcity.com/wish/wish.php?do=new

    After I filled out the form and submited it, I don't get any data from the form. I don't see it created any data files in my web server DATA directory. Do you have any suggestion?

    PHP Code:
    <?
    if($do=='new'){
    ?>
    I have changed it to

    PHP Code:
    if($_GET['do']=='new'){ 
    But I still cannot get any data.

    Thanks.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I have a web page which people can post their messages on it. Now for some reasons, I cannot submit a message to the website.
    The condition
    PHP Code:
    if($_GET['do']=='new'
    is true even before submit, since your have ?do=new in the url
    Please post your relevant code used inside the if block.

    btw, I think it's better to use
    PHP Code:
    if(isset($_POST['B1'])) 
    instead to carry the operation after submit.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Quote Originally Posted by abduraooft View Post
    The condition
    PHP Code:
    if($_GET['do']=='new'
    is true even before submit, since your have ?do=new in the url
    Please post your relevant code used inside the if block.

    btw, I think it's better to use
    PHP Code:
    if(isset($_POST['B1'])) 
    instead to carry the operation after submit.
    Could you tell me how to change the script?
    Please find attached part of the script. Thanks.
    Attached Files Attached Files

  • #4
    New Coder
    Join Date
    Sep 2009
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts
    im just new at this, but i dont see any PHP in it,,

  • #5
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    After I tuned on the php setting "register_globals = on", the form works fine now.

    http://www.uswebcity.com/wish/wish.php

    Thank you very much for your help.

  • #6
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    Bad idea: http://www.php.net/manual/en/security.globals.php

    Come php 6, that wont even work.
    PHP Code:
    $aString is_string((string)array()) ? true false// true :D 
    [/CENTER]

  • #7
    New Coder
    Join Date
    Sep 2009
    Posts
    34
    Thanks
    2
    Thanked 0 Times in 0 Posts
    problem solved


  •  

    Posting Permissions

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