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 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    agreement checkbox error php (help)

    On my website here - http://www.musicmodels.net/join.php

    when you click the 'I agree' button and submit, the page just reloads instead of moving to the next step. I dont understand this. I have tried uploading the php pages in both ASCII and binary and still the same problem.

    I guess it boils down to the coding itself but I have seen the same script working here: http://www.blackbizsearch.com/join.php

    Please can someone give me an idea of what maybe wrong. I have contacted the script support 3 times and they are not replying. Any idea's?

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    "I guess it boils down to the coding itself"

    Probably.. which means that any solution provided will be after the code is posted, since there's no other way to figure out whats up.

    Dan
    Last edited by whizard; 06-11-2007 at 01:55 PM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,370
    Thanks
    8
    Thanked 1,075 Times in 1,066 Posts
    For the radio button, you're using the variable name "submit1" ...

    We can't see your PHP script, so we can only guess that at the
    beginning of that script you have something like this:

    $agree = $_POST['submit1'];
    if($agree == 2){
    // you have agreed ... move on
    }

    But, look at your <form ... > line:
    <form method=post>

    That's all you have there?

    You need to call the next script, and THEN check for the radio button.

    <form action="mynextscript.php" method="post">

  • #4
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi, thanks for your time and replies.

    I have attached the php file in a .zip
    any idea's?

    Thanks for your time.
    Attached Files Attached Files
    Last edited by webspawner; 06-11-2007 at 02:30 PM.

  • #5
    Master Coder mlseim's Avatar
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,370
    Thanks
    8
    Thanked 1,075 Times in 1,066 Posts
    So you duplicated the script from one server to another and it works
    on one server (blackbizsearch), but the same exact script won't work
    on the server (musicmodels)? is that correct?

    If so, I think it might be an issue of PHP Globals turned on (or off).

    This allows variable values to be retained from one script to another.

  • #6
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I bought the script from script66.com and blackbizsearch is an example of the script elsewhere.

    I will ask my hosting provider about php global config

    thanks.

  • #7
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just tried using a .htaccess file with the following line:

    Code:
    php_value register_globals = off
    Its didnt work. should there be anything else in the file.

    i dont know how to write the commaon for a php.ini and ive tried searching.

    Any ideas.

    Thanks,

  • #8
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    2,958
    Thanks
    2
    Thanked 304 Times in 296 Posts
    The php code in the file you attached relies on register globals being ON. The correct syntax to do this in a .htaccess file is -
    Code:
    php_value register_globals on
    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.

  • #9
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the reply.

    I have created a .htaccess file with the line below

    php_value register_globals on

    It still doesnt work

    any idea's?

  • #10
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    2,958
    Thanks
    2
    Thanked 304 Times in 296 Posts
    What type of web server? Apache, IIS, or other? Only Apache supports .htaccess files.

    It is also possible that your hosting company has prevented register_globals from being turned on in a .htaccess file, in which case you will need to correct the code so that it does not rely on register_globals.

    In any case, correcting the code so that it does not rely on register globals will solve this problem on your current server, any future servers, or any future versions of PHP (register globals will be complete removed in PHP6.)
    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.

  • #11
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for everyones help!

    It was 'register_globals'.

    I need to turn it on via a local php.ini



  •  

    Posting Permissions

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