Jump to content

Search the Community

Showing results for tags 'multiple values'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 4 results

  1. I'm trying to include a checkbox group in a form submission. The user can check one, two, or all three of the choices. I need only the checked boxes to how can i do that? help me with a small example if possible so that i can nderstand well,plzzz. Thank you!
  2. I have a html form having a dropdown box from which i need to retrieve multiple data and display it on another page could anyone help me with the code please. 1)PHP code 2)the options i need to put in the dropdown menu to make the code work
  3. I am making a website having a "skills" field which is a dropdown menu dropdown menu which fetch's data from database and assign the Id to the option tag dynamically 1) I dont know if the id is assigned or not below is my code:- <select name="sname[]" id="sname" size="1" multiple="multiple" title="hold ctrl and click multiple options" > <?php include 'conn.php'; $que=mysql_query("select * from field"); while($row=mysql_fetch_array($que)) { $id=$row['id']; $field=$row['field']; echo "<option id="$id">".$field."</option>"; } ?> </select> 2)how do I insert multiple values of the option tag into the database into the database?
  4. Hello, I'm sorry if I'm not posting this in the correct section; I appologize if I'm not. I'm new to this whole PHP thing, and I am currently building an e-commerce website based on Adam Khoury's video tutorial series on youtube. I'm at a wall here with what I'm trying to do. I've got a drop-box next to the images (products) so that customers can choose which size they will need (the prices will change as well). In the shopping cart page I've got a table with the "Product", "Product Description", "Unit Price", "Quantity", "Total Price" and "Remove" each in their perspective columns. When a customer chooses from the drop-down, I would like that then to send a dollar value to the "Unit Price" column of the cart page and I would also like it to list the size/type of print in the "Product Description" box. I'm not sure how to get it to generate two values like that, or if it's even possible. But here's what I have for code for the product selection page: <form action="cart.php" method="post"> <select name="prints"> <option value="">Select a print size</option> <option value="175.00" name="11x14 Canvas Wrap - $175.00" id="175" >11x14 Canvas Wrap - $175.00 </option> <option value="250.00" name="16x20 Canvas Wrap - $250.00" id="250" >16x20 Canvas Wrap - $250.00 </option> <option value="280.00" name="20x30 Canvas Wrap - $280.00" id="280" >20x30 Canvas Wrap - $280.00 </option> <option value="325.00" name="30x40 Canvas Wrap - $325.00" id="325" >30x40 Canvas Wrap - $325.00 </option> <option value="20.00" name="4x6 Print - $20.00" id="20" >4x6 Print - $20.00 </option> <option value="30.00" name="5x7 Print - $30.00" id="30" >5x7 Print - $30.00 </option> <option value="50.00" name="8x10 Print - $50.00" id="50" >8x10 Print - $50.00 </option> <option value="75.00" name="11x14 Print - $75.00" id="75" >11x14 Print - $75.00 </option> <option value="100.00" name="16x20 Print - $100.00" id="100" >16x20 Print - $100.00 </option> <option value="125.00" name="16x24 Print - $125.00" id="125" >16x24 Print - $125.00 </option> <option value="150.00" name="20x30 Print - $150.00" id="150" >20x30 Print - $150.00 </option> <option value="175.00" name="24x36 Print - $175.00" id="176" >24x36 Print - $175.00 </option> <option value="200.00" name="30x40 Print - $200.00" id="200" >30x40 Print - $200.00 </option> <option value="250.00" name="40x50 Print - $250.00" id="251" >40x50 Print - $250.00 </option> <option value="300.00" name="40x60 Print - $300.00" id="300" >40x60 Print - $300.00 </option> <input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" /> <input type="submit" name="button" id="button" value="Add Selected to Shopping Cart" /></form><br /> I know I will need to add another value in order to get it to generate another value on the "cart.php" page, but I'm just not sure how. My cart.php is an absolute mess which I will have to clean up as well. (PHP boggles my mind). Here's what the code looks like to re-generate the information into that table I was telling you about: <p><?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 4 (if user wants to remove an item from cart) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (isset($_POST['index_to_remove']) && $_POST['index_to_remove'] != "") { // Access the array and run code to remove that array index $key_to_remove = $_POST['index_to_remove']; if (count($_SESSION["cart_array"]) <= 1) { unset($_SESSION["cart_array"]); } else { unset($_SESSION["cart_array"]["$key_to_remove"]); sort($_SESSION["cart_array"]); } } ?> <?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Section 5 (render the cart for the user to view on the page) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $cartOutput = ""; $cartTotal = ""; $pp_checkout_btn = ''; $product_id_array = ''; if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) { $cartOutput = "<h2 align='center'>Your shopping cart is empty</h2>"; } else { // Start PayPal Checkout Button $pp_checkout_btn .= '<form action="[url="https://www.paypal.com/cgi-bin/webscr"]https://www.paypal.com/cgi-bin/webscr[/url]" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.