newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

$cmd not set in php_validation.php example #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

It seems that the php_validation.php example doesnt work because $cmd is
never set.

To make it work I must change the top of the example to something like:

if(isset($_POST['cmd'])){
  $cmd = $_POST['cmd'];
} else if (isset($_GET['cmd'])){
  $cmd = $_GET['cmd'];
} else {
  $cmd = "";
}

I see in your example online it works, so im not sure whats going on there...

Thanks.

Original issue reported on code.google.com by moncojhr@gmail.com on 22 Jan 2010 at 4:10

GoogleCodeExporter commented 8 years ago
Thanks for this feedback, moncojhr.  The example works on
http://www.imavex.com/formbuilder/examples/php_validation.php b/c the
register_globals setting in the php.ini file is set to ON.  You are correct 
with your
provided code above, and I certainly appreciate you being this to my attention. 
 I
will update the example files using the $_GET and $_POST syntax, which will 
solve
these php.ini discrepancies.

Thanks again for the feedback and your support of this project.  Please don't
hesitate if you have any more questions/concerns.

- Andrew 

Original comment by ajporterfield@gmail.com on 22 Jan 2010 at 4:58

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 22 Jan 2010 at 5:00

GoogleCodeExporter commented 8 years ago
Hi, ajporterfield,

You may also want to look at using full php tags

<?php ?>

instead of <? ?> as this is another php.ini setting that may cause issues...

Is it appropriate to create new "issues" for potentially new features?

Thanks!

Original comment by moncojhr@gmail.com on 22 Jan 2010 at 6:33

GoogleCodeExporter commented 8 years ago
Ah yes, including full php tags is also a good idea.  I'll make sure this gets 
into the 
$_GET/$_POST updates as well.

To answer your question...
Yes, feel free to add new issues for new feature requests.

Original comment by ajporterfield@gmail.com on 22 Jan 2010 at 2:28

GoogleCodeExporter commented 8 years ago
The example php files as well as the main class file (class.form.php) have been 
updated 
to use full php opening tags (<?php) and $_POST/$_GET syntax.  This was done to 
eliminate php.ini discrepancies.

Original comment by ajporterfield@gmail.com on 22 Jan 2010 at 5:02