Jump to content

Terry103

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Terry103's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a repeat region and a drop-down box on each line. It is populated from a database. When the user clicks on the add 2 cart button, it needs to send to the next page the option selected on that row so it can be saved in the cart data. ( My app is letting the user select a color) I am leaving the page I am on and opening the cart page. From the posted example, I need the url to contain 'card=VISA'. All I get is 'card=' and then an error stating that $card is an unknown variable.
  2. Is there a way to pass the value from a drop-down select box via the url to another page: I can do it if I use a submit control, but that's not what I need to do. Here is a bare bones example: test.php <head> <title>Passing Variables</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form action="test2.php" method="post" >   <table width="100%" border="1">     <tr>       <td width="8%">&nbsp;</td>       <td width="15%"><select name = 'card'>           <option>VISA           <option>MasterCard           <option>American Express</select></td>       <td width="77%"><a href="test2.php?<?php echo "card="; echo $card; ?>">Add         to Card </a><a href="test2.php?<?php echo "card="; echo $card; ?>"></a></td>     </tr>   </table>   </form> </body> </html> test2.php: <?php   // create short variable names   $card = $_POST['card']; ?> <html> <head> <title>Results</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body><?php echo $card; ?> </body> </html> When I click on the 'Add to Cart' text, I can't figure out how to get the value from the 'card' control. Any help?
  3. How do I call a function from within a cell in a table? I have tried: <?php echo 'calcprice('; echo $row_rs_ebicases['price']; echo ','; echo $discnt; echo ')';?> This shows the correct values that are passed, but does not call the function and return a value
  4. I have a table that shows data from a MySQL database. In the last two columns of the table, I have a drop-down list and then an 'Add to Cart' Button. The drop-down list is populated from another MySQL table. Because the drop down list is created for each line, they all have the same name. When I click on the 'Add to Cart' Button, It sends info to the next page via the echo command. The problem is that I can't get the value in the drop down list to go to the next page. How do I access the value in the drop-down list to send it to the next page?
×
×
  • 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.