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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:27:50+00:00 2026-06-18T00:27:50+00:00

I have a form with some input texts. It’s counted with the name +

  • 0

I have a form with some input texts. It’s counted with the name + an id. Like:

megnevezes_1
megnevezes_2

My form has also a counted id tag, called tid_1 and go on.

When I post my form i made a hidden input called darab, which counts how many id’s I have.

Then I do the mysql query:

for($k=1; $k=$darab; $k++){
$command = <<<HTML
UPDATE
    $dbtablename_template_tetelek
    SET
    vamtarifa_szj = '$vamtarifa_szj_$k',
    megnevezes = '$megnevezes_$k',
    me_egyseg = '$me_egyseg_$k',
    mennyiseg = '$mennyiseg_$k',
    afa = '$afa_$k',
    egyseg_ar = 'str_replace(".","",$egyseg_ar_$k)'
    WHERE template_id = '$tid_$k'

HTML;

mysql_query($command,$kapcsolat) or die(mysql_error(). $command);
}

But theres something wrong with it. How to attach to my strings the $k string with _? And how to make the str replace in the query?

  • 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-18T00:27:52+00:00Added an answer on June 18, 2026 at 12:27 am

    Try this..

    for($k=1; $k=$darab; $k++){
    
    $blah = $egyseg_ar . '_' . $k;
    $replace = str_replace(".", "", $blah);
    
    $command = <<<HTML
    UPDATE
        $dbtablename_template_tetelek
        SET
        vamtarifa_szj = '$vamtarifa_szj_$k',
        megnevezes = '$megnevezes_$k',
        me_egyseg = '$me_egyseg_$k',
        mennyiseg = '$mennyiseg_$k',
        afa = '$afa_$k',
        egyseg_ar = $replace
        WHERE template_id = '$tid_$k'
    
    HTML;
    
    mysql_query($command,$kapcsolat) or die(mysql_error(). $command);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form with some generated input fields like theese: <input value=March name=month[March]
I have a form with some input texts passed in GET, and i don't
I have a form with some input fields: Folder Name: <input type=text id=folderName name=folderName
i have form that has multiple input text boxes, Which has got some text
I have some input text field in a form that have name with this
suppose I have a form: <form id=someform action=some.php method=get> <input type=text name=somename /> <input
I have a contact form with some fields like Name, Email, Subscribe. The Subscribe
I have a web page like this: <form id=some-form> <input type='text'> <button type=submit> </form>
Lets say I have CSS like this: div.form label input { /* some css
I have a form for user to input some feedbacks, and this form has

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.