Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6928933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:15:13+00:00 2026-05-27T11:15:13+00:00

An application I’m working on requires that I store certain values in a database

  • 0

An application I’m working on requires that I store certain values in a database (coming from a submitted form). Like for example:

$sql="INSERT INTO Employment (JobTitle, StartDate, EndDate) VALUES('$_POST[jobtitle]','$_POST[startdate]','$_POST[enddate]')";

Once they’re in the database, how do I access them individually in the following context:

 if ($jobtitle=='123') {
        echo "You're a software developer.";
    } elseif ($jobtitle=='1234') {
        echo "You're a software tester.";
    }

Essentially, it’s a recommender system where I need to be able to issue recommendations based off of the data in the database. I.e., if job title is this, if start date – end date = this, etc. I’m a beginner with mySQL. Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:15:13+00:00Added an answer on May 27, 2026 at 11:15 am

    1) First, you need to know at least a little PHP. It sounds like you’ve gotten that far, and that you can successfully establish a connection to the database (at least to do your “insert”). Good.

    2) Next, you need to know at least a little SQL. It sounds like that’s where you’re stumped at the moment. The most basic SQL commands are:

    • Select (usually people learn this one first ;))

    • Insert

    • Update

    • Delete

      W3Schools has a series of great on-line tutorials that cover 1) and 2):

    http://www.w3schools.com/php/php_mysql_intro.asp

    3) Before you put anything into production, you should ALSO learn a bit about security:

    • Securing your web server (e.g. Apache)

      http://bignosebird.com/security.shtml

    • Securing your database (e.g. mySQL)

      http://www.symantec.com/connect/articles/securing-mysql-step-step

    • Securing your application (e.g. against cross-site scripting and SQL injection)

      http://www.insanevisions.com/article/221/Tutorials/PHP-Security/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Application deals with strings that represent decimals that come from different cultures. For example
Application.Run(form); Actually I tried to call this from my project. I got this exception.
Application 1 - Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
Application : I am working on one mid-large size application which will be used
my application use 10 threads that to read a lot of html file.similar the
Application uses Entity Framework 4.1 with database first approach. I have in database a
Application settings in Windows Forms is a convenient way to store application-wide properties. However,
My application is not all to complicated. It retrieves a single entity from a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.