Jump to content

Database


Joey46
 Share

Recommended Posts

I keep getting an error and have tried several things to fix this but nothing is working could someone please help me this is my PHP code<?php$host = 'db.kwilliams.cessnock-ict.net';$user = 'kgillis';$pswd = 'student1';$myDB = 'kgillisdb';$conn = mysql_connect($host, $user, $pswd);@mysql_select_db($myDB, $conn) or die ("WHOOPS Problem");$ID =$_POST['Module_I.D'];$Name =$_POST['Module_Name'];$Number =$_POST['Module_Number'];$Hours =$_POST['Nominal_Hours'];$sql = "INSERT into Modules (Module_I.D, Module_Name, Module_Number, Nominal_Hours,) values ('$Module_I.D', '$Module_Name', '$Module_Number', '$Nominal_Hours',)"; if(mysql_query($sql, $conn)){ echo "<h4> module Added! </h4>"; } else { echo "<h4> ITS DEAD DUE TO ERROR</h4>"; } ?>

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
 Share

×
×
  • Create New...