We help IT Professionals succeed at work.

Need help reconstructing two class files that are missing.

cnl83
cnl83 asked
on
63 Views
Last Modified: 2015-09-26
I have a project that I had someone make years ago. I decided to revive the project and im missing two files. I don't know jQuery, and im a novice with PHP.


1) First take a look at the screenshot. This a zoomed out look at the form. Each section is really it's own PHP file that should only show after the previous submission. I posted the code from one of the sections on the form.
2) Notice the two lines that require Dbmodule and Validation.
3) There is a jquery folder with two files which I also attached.
Obviously the dbmodule is most likely database connection information but im unsure about the validation class file because I assume it's using the jquery. The project is bigger than it looks and this is why im not resorting to recreating it just yet. Thanks for your help. I also assume the validation class file is what gives the form the characteristics such as sliding and hiding fields.

<?php
require_once('../../_class/DBmodule.class.php');
require_once('../../_class/Validate.class.php');

if (isset($_POST['hpi_save']) && $_POST['hpi_save'] == 'hpi_sent')
{
	$db = new DBmodule();
	$db->dbConnect();
	$fields = array('Customers_id', 'q1', 'q2', 'q3', 'q4', 'q5');
	$values = array($_POST['Customer_id'], $_POST['hpi_1'], $_POST['hpi_2'], $_POST['hpi_3'], $_POST['hpi_4'], $_POST['hpi_5']);
	if (!empty($_POST['hpi_id']))
	{
		$id = $_POST['hpi_id'];
		if ($db->update('hpi', $fields, $values, $id))
			echo "Your update was successful.";
		else
			echo "Your update failed.";
	}
	else
	{
		$lastid = $db->insert('hpi', $fields, $values);
		if ($lastid > 0)
			echo "Customer information successfully added.";
		else
			echo "Customer information failed to add.";	
	}
}
else
	echo "hpi_save not set";

?>

Open in new window


jq.zip
Screenshot
Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I've requested that this question be deleted for the following reason:

It was a longshot
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.