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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:50:38+00:00 2026-05-30T17:50:38+00:00

Users of my website can generate a custom form. All the fields are saved

  • 0

Users of my website can generate a custom form. All the fields are saved in a database with a unique ID. When someone visits the form, the fields ‘name’ attribute is field*ID*, for example

<p>Your favorite band? <input type="text" name="field28"></p>
<p>Your Favorite color? <input type="text" name="field30"></p>

After submitting the form, I use php to validate the form, but I don’t know retrieve the value of $_POST[field28] (or whatever number the field has).

<?
while($field = $query_formfields->fetch(PDO::FETCH_ASSOC))
 {
 $id = $field[id];

 //this doesn't work!!
 $user_input = $_POST[field$id];

 //validation comes here
 }
?>

If anybody can help me out, it’s really 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-30T17:50:40+00:00Added an answer on May 30, 2026 at 5:50 pm

    Add some quotes:

    $user_input = $_POST["field$id"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a website where users can register. I would like to prevent all special
I have a contact form on my website so users can send me an
On my website users can keyword search and find desired results. (Just a simple
I have website where users can login with their Facebook account. I am using
I have a website where users can purchase tickets, but ticket quantities are usually
I want to create an website where users can create their own teaching resources,
I'm working on a website where users can create and save their own HTML
I have multiple themes on my website and users can just switch between multiple
I am looking to add functionality to my website where users can add an
Users on a website I'm building can request the availability of user names on

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.