Sorry for the duplicate post...

I just posted an AJAX forms generator that will read a MYSQL table, allow you to define how the fields are treated and then generate the necessary HTML, Javascript and PHP files to implement the form.

You end up with a complete and working form backed by code thats very easy to modify and enhance and is certainly ready to deploy... you just add graphics!

I need some people to give it a try... AND give me some feedback!

http://www.philpetree.com/ajaxforms

After selecting a table, it brings me to tableparam.php which has a few errors. On line 20 of the tableparam.php file you have the variable $database which doesn't exist.

I am also getting:

Notice: Undefined offset: 1 in C:\programming\stillwaters\public_html\forms\inc\mysqlAjaxForm.class.php on line 88

genform.php also has the $database variable error, along with an fopen error because the directory 'html' doesn't exist.

Awesome! I'll look at those tonight and tomorrow. Thanks for taking the time to do this... what works on a dev machine will often not work on someone elses! LOL

I'll post fixes as soon as I can!

I tried the new code and it seems to work. Overall I would say it can be a useful tool to procedural coders.

A few things I found that you might think about doing:

- Make the code PHP5 strict.
- Make the forms work without ajax. Some people don't use javascript and have it disabled.
- There are sql injection vulnerabilities in the script. They need to be fixed.

I would need to test it more thoroughly to find other problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.