Meg_Griffin Posted February 19, 2013 Share Posted February 19, 2013 Hi guys,I have a system and the registration part of it doesn't work but it doesn't report any errors.Any ideas of what is going on? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 19, 2013 Share Posted February 19, 2013 Not without seeing the relevant code. Link to comment Share on other sites More sharing options...
Meg_Griffin Posted February 19, 2013 Author Share Posted February 19, 2013 (edited) <?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 February 19, 2013 by Meg_Griffin Link to comment Share on other sites More sharing options...
thescientist Posted February 19, 2013 Share Posted February 19, 2013 (edited) 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 February 19, 2013 by thescientist Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now