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

  • SEARCH
  • Home
  • 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 7883091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:26:30+00:00 2026-06-03T04:26:30+00:00

So I have a form that users fill out with some radio buttons. The

  • 0

So I have a form that users fill out with some radio buttons. The values from the radio buttons get passed to MySQL. I now want to pull those values from the database, display them in a table on a different page, and apply different styles to them with span tags.

Here’s the code from the form:

<input class="radio_style" type="radio" name="job_type" value="fulltime"/>Full-time<br/>
<input class="radio_style" type="radio" name="job_type" value="parttime"/>Part-time<br />

Here’s the code for the page where I want to display it:

<div class='job_type_div'>
    <?php if($job_type=='fulltime') {?>
        <span class='job_type_style'>
            <?php echo $row['job_type']; ?>
        </span>
   <?php if($job_type=='parttime') {?>
        <span class='job_type_style2'>
            <?php echo $row['job_type']; ?>
        </span>
            <?php } ?>
    <?php } ?>
</div>

So ideally, the “fulltime” value will have one style and the “parttime” value will have another style. But when I try running this code, nothing happens. I’m definitely connecting to the database correctly. And the row name is properly labelled “job_type”. Any ideas on where I might be going wrong? 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-06-03T04:26:31+00:00Added an answer on June 3, 2026 at 4:26 am

    may be problem in your php. Is there some logic?

    $job_type=null;
    if($job_type=='fulltime'){
       ...
       if($job_type=='parttime'){
          ...
       }
    }
    

    did you set $job_type variable? May be you need something like this:

    <div class='job_type_div'>
        <?php if($row['job_type']=='fulltime') {?>
            <span class='job_type_style'>
                <?php echo $row['job_type']; ?>
            </span>
       <?php } elseif($row['job_type']=='parttime') {?>
            <span class='job_type_style2'>
                <?php echo $row['job_type']; ?>
            </span>
        <?php } ?>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my site, I have a form that users fill out to become a
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay all, I have a form that I want users to fill out. When
I have an ASP.NET Web Form (C#) that users fill out, it has a
I have a form that users fill out, and on the form there are
All, I have some forms that my users fill out some forms that have
I have a form that the users for my website will fill out. Once
I have a website that asks numerous users to fill out a form. There
(Using MySQL and PHP) I have a search form that will allow my users
I have a form that a user would fill out while creating a ticket

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.