Skip to content
Advertisement

Form is not submitting to database [closed]

So after I enter the information on my form it refreshes the new.php page with a new form but doesn’t submit any information. I get no errors its just like I clicked refresh on the page. I feel like i’ve done everything right but I just can’t seem to figure out why this isn’t working. I’ve just transitioned from mysql to mysqli so I’m kinda a noob with it. It’s also not routing back to home.php.

new.php

JavaScript

Advertisement

Answer

Check after adding name="submit" in <button type="submit" class="btn btn-default">Submit</button>

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement