Learn WordPress from the Best Tutors
Search in
Hi how to insert the data in database by using WordPress?
<?php
require_once('/wp-config.php');
global $wpdb;
if(isset($_POST['submit'])){
$wpdb->insert( 'wp_post_job', array( 'organizationname' =>
$_POST['organizationname'], 'post' => $_POST['post'], 'publishfrom' =>
$_POST['publishfrom'], 'publishupto' => $_POST['publishupto'],
'qualification1' => $_POST['qualification1'], 'qualification2' =>
$_POST['qualification2'], 'qualification3' => $_POST['qualification3'],
'qualification4' => $_POST['qualification4'], 'experience1' =>
$_POST['experience1'], 'experience2' => $_POST['experience2'],
'experience3' => $_POST['experience3'], 'training1' => $_POST['training1'], 'training2' => $_POST['training2'], 'training3' => $_POST['training3'],
'training4' => $_POST['training4'], 'training5' => $_POST['training5'] ),
array( '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s', '$s' ) );
}
?>
<?php
/*
Template Name: Form
*/
?>
<?php global $pc_theme_object; /* Reference theme framework class */ ?>
<?php get_header(); ?>
<form action="" id="postjob" method="post">
<table>
<tr>
<td><label for="organizationname">Organization Name:</label></td>
<td><input type="text" name="organizationname" id="organizationname" value="/></td>
</tr>
<tr>
<td><label for="post">Post:</label></td>
<td><input type="text" name="post" id="post" value="" /></td>
</tr>
<tr>
<td><label for="publishfrom">Publish From:</label></td>
<td><input type="text" name="publishfrom" id="publishfrom" /></td>
</tr>
<tr>
<td><label for="publishupto">Publish Upto:</label></td>
<td><input type="text" name="publishupto" id="publishupto" /></td>
</tr>
<tr>
<td><label for="qualification">Qualification:</label></td>
<td><input type="text" name="qualification1" id="qualification1" /></td>
<td><input type="text" name="qualification2" id="qualification2" /></td>
<td><input type="text" name="qualification3" id="qualification3" /></td>
<td><input type="text" name="qualification4" id="qualification4" /></td>
</tr>
<tr>
<td><label for="experience">Experience:</label></td>
<td><input type="text" name="experience1" id="experience1"/></td>
<td><input type="text" name="experience2" id="experience2"/></td>
<td><input type="text" name="experience3" id="experience3"/></td>
</tr>
<tr>
<td><label for="training">Training:</label></td>
<td><input type="text" name="training1" id="training1" />></td>
<td><input type="text" name="training2" id="training2" /></td>
<td><input type="text" name="training3" id="training3" /></td>
<td><input type="text" name="training4" id="training4" /></td>
<td><input type="text" name="training5" id="training5" /></td>
</tr>
<tr>
<td><button type="submit" name="submit">Submit</button></td>
</tr>
</table>
</form>
<?php get_footer(); ?>
read less View 7 more Answers
Related Questions
I am working as a WordPress developer from 2 years. But from beginning to till now I am working on the same things, what should I learn now to grow my career?
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Make a Career in Mobile Application Programming
Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...
Learn Microsoft Excel
Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...
8 Hottest IT Careers of 2014!
Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...
Top 5 Skills Every Software Developer Must have
Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today. In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...
Looking for WordPress Training?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for WordPress Classes are on UrbanPro
The best Tutors for WordPress Classes are on UrbanPro