Jump to content

Help in PHP Mysql INSERT INTO query


TayyabMunawar

Recommended Posts

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 ....

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.