TayyabMunawar Posted January 10, 2015 Share Posted January 10, 2015 Hello every body,, i want to create a new database (auto generate duty assigned using form) in PHP and mysql.. i have four input fields:- Name, Subject, Class & weekly lectures now i want to insert name,subject & class into database, when i insert number of weekly lecture in field four.. insert automaticlly in database multiple time which i write in field four (weekly lecture) database: table structure i have already is::: id-name-subject-class-period-monday-tuesday-wednesday-thursday-friday-saturday anybody please help me to create this database or just insert query .... Quote Link to comment Share on other sites More sharing options...
budimir Posted January 10, 2015 Share Posted January 10, 2015 You're insert statment would be: $sql = "INESRT INTO table (table_fileds) VALUES ($values_to_store)"; $query = mysqli_query($conn,$sql); As I can see you are stating to work with mysql and php, so I would advise you to seach through google a bit and than ask for some help. Nobody is going to give you a complete solution. A push in right direction you will get here. Quote Link to comment Share on other sites More sharing options...
TayyabMunawar Posted January 10, 2015 Author Share Posted January 10, 2015 Dear Budimir i already worked on this... successfully insert data multiple time.. but now cannot understand how insert that data automatically in different days.. Quote Link to comment Share on other sites More sharing options...
budimir Posted January 10, 2015 Share Posted January 10, 2015 Please post you're code so we could help you. Quote Link to comment Share on other sites More sharing options...
Barand Posted January 10, 2015 Share Posted January 10, 2015 Your data table contains "period". Where is that coming from? How does the number you are entering into the fourth field relate to the Monday, Tuesday, ..., Saturday fields in the table? If it is day number to indicate the column, what value goes into the day column? What are you trying to achieve in the end? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.