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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:31:30+00:00 2026-05-29T11:31:30+00:00

Hello I’m trying to give each of these button names a uniquely numbered name.

  • 0

Hello I’m trying to give each of these button names a uniquely numbered name. There can be up to 50 of these button pairs and each pair will refer to one order. (This is for the admin page of a practice estore im building) Anyway, where their name is currently “dele_ord” and “ship_ord” I would like it to be (somehow) Dele_ord($i) So that each button is numbered ie: dele_ord34

Once i have this setup I will use an if(isset($_POST(dele_ordXX){…} to run database queries that will delete or modify the orders associated with the buttons.

Im very new to php and mysql and want to learn it better.

        $i=1;
           while($i<=50)
        {
        echo '<h5>'.$row['o_id'].' || '.$row['first_name'].' || '.$row['last_name'].' || '.$row['prod_id'].' || '.$row['prod_title'].' || '.$row['prov'].' || '.$row['city'].' || '.$row['street'].' || '.$row['s_instruct'].' || '.$row['order_time'].' || '.$row['ship_status'].'</h5>';

        echo'<form action="admin.php" method="post" class="dele_o"><input type="button" name="delete_ord" value="Delete Order"></form>';
        echo'<form action="admin.php" method="post" class="ship_o"><input type="button" name="ship_ord" value="Ship Order"></form> <br />';         

        $row = mysqli_fetch_array($result);
         $i++;
        }
        mysqli_close($link); 
        ?>
  • 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-29T11:31:31+00:00Added an answer on May 29, 2026 at 11:31 am

    You don’t need a separate <form> tag for each button, you can have multiple submit buttons with different names in the same form.

    Anyway, to answer your question, if you use double quotes “…” instead of single ‘…’ for your echo commands, then php allows you to embed variables within your string, for example:

    $i = 5;
    echo "<input type=\"button\" name=\"delete_ord$i\" value=\"Delete Order\">";
    

    That will output

    <input type="button" name="delete_ord5" value="Delete Order">
    

    Note how I’ve used \ to escape the double quotes in the string, although you could also just use single quotes for your HTML attributes instead if you prefer.

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

Sidebar

Related Questions

Hello There, I am new to phonegap.I am trying to record a audio clip
Hello i am trying to check to see if there is a row in
Hello there am trying to save news tweets into three different array which are
Hello i am trying to detect application installed so that i can do some
Hello I was wondering how I can setup several things in a constructor, but
Hello I am trying to get status of battery of the device programmatically. So
Hello I have following column in SSRS Report. Column Name(Title) Mehta, Natasha(18)----its Title+(count) value
Hello All I am trying to flatten a list in Ocaml. I am a
. Hello, I am trying to add a UIButton and other items to my
. Hello, I am trying to make a Custom Segue for my storyboard. Now

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.