View Full Version : agreement checkbox error php (help)

06-11-2007, 02:40 PM
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?

06-11-2007, 02:52 PM
"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.


06-11-2007, 02:54 PM
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">

06-11-2007, 03:25 PM
hi, thanks for your time and replies.

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

Thanks for your time.

06-11-2007, 03:46 PM
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.

06-11-2007, 04:16 PM
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


06-11-2007, 04:39 PM
I just tried using a .htaccess file with the following line:

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.


06-11-2007, 04:48 PM
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 -

php_value register_globals on

06-11-2007, 05:08 PM
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?

06-11-2007, 05:20 PM
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.)

06-11-2007, 11:40 PM
thanks for everyones help!

It was 'register_globals'.

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