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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:16:36+00:00 2026-06-16T23:16:36+00:00

I have been spinning my wheels trying to figure out why my php code

  • 0

I have been spinning my wheels trying to figure out why my php code is not able to reference a select box in my forms html. Here is the HTML form:

<form action="/cart.php" method="post">
     <input type="hidden" name="action" value="add" />
     <input type="hidden" name="sku" value="C3" />
<h3>Callaway</h3>
<div class="img-box">
        <p>
             <img alt="X Hot Pro Hybrid" src="/products/kona.jpg" />
             <h7>X Hot Pro Hybrid</h7>
             <br />
             <label><strong>Price:</strong> 7.99
             <br />
             <strong>Availability:</strong> In Stock
             <br />
             <strong>Hand: </strong>
             <select name="hand">
                 <option value="Right">Right</option>
                 <option value="Left">Left</option>
             </select>
         </label>
         <br />
         </p>
         <p>
             <a href="/cart.php?sku=C3&action=add" class="button">Add to Cart</a>
         </p>
     </div>
 </form>

and here is the line from cart.php:

$hand = $_POST["hand"];

any thoughts?

  • 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-16T23:16:38+00:00Added an answer on June 16, 2026 at 11:16 pm

    It doesn’t look the form is actually posting. The Add to Cart button is just passing some parameters on the URL. You’ll have to add the value to the URL (via JavaScript) that the Add to Cart link is using (probably not a good idea), use an actual submit button or submit image or have the link submit the form using Javascript.

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

Sidebar

Related Questions

I have been spinning my wheels now for awhile trying to figure out how
I have been spinning my wheels for a couple hours on why when I
Ok, so I have been spinning my wheels on this one for a long
Have been trying to encrypt an xml file to a string so that I
Have have been trying to make a validator for my xml files. I have
I've been learning Degrafa recently, and I have noticed that there is not much
Link to code I have been struggling with this code for about two weeks
I have been trying to create a random picture display animation, in the style
I have been trying to set up TeamCity 6.5 as a WAR under Tomcat
I'm Pulling my hair out. I've been trying for 5 hours to get a

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.