0

Hi i am struggling to find the correct code i need to insert the values from a custom form to a custom table i have already created. My form is as below

Add a activity

Supervisor:

Description

Date


and i have already created the table in wordpress to accept these fields. the table is called wpd_activity_record and has the following columns name - varchar description - varchar date - Date

can anyone help me please to get me going with this? cheers Kevin

  • Can you edit your question and post the code used to create the template? If possible, also post the table you would like to create with examples where the data should go. – Tom Oct 19 '17 at 0:32
0

This is the code to create the form, i have created the table already, it has 3 columns, name [varchar], description [varchar] and date [date]. i am missing the code to include that allows the from to upload the values in the fields to the table please.

<form method = "post" action = ""> <h3>Add a activity</h3> <p style="font-weight:bold;" label for="supervisor">Supervisor:</label> <input type="text" name="supervisor"/> </p> <p style="font-weight:bold;" label for="description">Description</label> <input type="text" name="description"/> </p> <p style="font-weight:bold;" label for="date">Date</label> <input id="date" type="date" name="date"/> </p> <hr> <input type="submit" value="Submit" name="activity_submit"/> </form> </br>

The table is called wpdb_activity_record ,and image of which is below.

this is the table in the db that i have created

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.