Jump to content

Registration doesn't work


Recommended Posts

<?php include('../config/header.php'); ?><?php include('../config/globals.php'); ?> <div class="body"> <div class="topo"></div><h1 class="title">Register Employees</h1> <form method='POST' action='<?php echo DIR ?>/staff/register_employees.php' class="table"> <p>Name: <input name='name' /></p> <p>Phone Number: <input name='phone_number' /></p> <p>Adress: <input name='adress' /></p> <p>Sallary: R$ <input name='sallary' /></p> <p>Occupation: <input name='occupation' /></p> <p>Department: <input name='department' /></p> <button type='submit'>Register</button></form></div><?php if (count($_POST) > 0){ insert($_POST, 'employees'); ob_clean(); header('LOCATION: '.DIR.'/employees/list_employees.php'); }?><?php include_once('../config/footer.php'); ?>

Edited by Meg_Griffin
Link to comment
Share on other sites

what is insert()? Are we assuming some sort of DB wrapper class or something? If you aren't using native functions of the language, and are instead using custom or 3rd party API's, then by all means do us a favor and include the code or links to their documentation. to see errors though, you would want to enable error reporting, either manually or through php.ini. edit: there is whole host of other things to consider (sanitation, validation) but one step at a time.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...