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 8042831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:43:04+00:00 2026-06-05T04:43:04+00:00

I have these profiles saved in a database with lots of random information like

  • 0

I have these profiles saved in a database with lots of random information like name, gender, age, etc.

The user can edit their profile by clicking a hyperlink and it takes them to a form much like the one they filled out when they first registered. I’ve designed it so all the text input fields already have the values they had previously filled in. Here’s an example of what one looks like:

<input type="text" name="fname" value="<?php echo $result['firstName']; ?>"/>

As you can see I’m echoing their name from the array I created from querying the database. But the problem is I used radio buttons (and drop down boxes too) for some of these inputs like gender.

So how do I check the appropriate radio button once I establish they’re male or female from the database?

  • 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-05T04:43:05+00:00Added an answer on June 5, 2026 at 4:43 am
    <input type="radio" name="gender" value="m" <? if($row['gender'] == "m") print "selected";?> >
    <input type="radio" name="gender" value="f" <? if($row['gender'] == "f") print "selected";?> >
    

    i think it’s simplier. because they can;t be both, at the same time.

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

Sidebar

Related Questions

In our database we have a user. A user can have certain metadata (Like
I have a website that contains company profiles. These profiles have many pages within
I have these tables: comments uid id pid pages pid user users id rank
I have these simplified types: public class DataBean extends ZZZZZ { public String name;
Basically I do have pretty simple database that I'd like to index with Lucene.
I have two classes, namely User & UserProfile User contains(few attributes like):- userId loginId
In my web application I have a user profile page. That page has these
I would like to access profiles table from my Profile model which belongs_to :user
I have a ingredient mysql database. I let the user save to their profile
I am writing a web application and have just implemented that a user can

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.