PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello
This is the code for a checkbox, the results shall be within a form, but what I want to know is how do I get the address of the checkbox results in a description?
<html>
<head>
<title>Color</title>
</head>
<body>
<h1>LIST CHECKBOX</h1>
<p>
<form method="post" action="recuveraCheckbox.php">
<input type="checkbox" name="myCheck[a]" value="Green" /> Valore A
<br />
<input type="checkbox" name="myCheck[b]" value="Red" /> Valore B
<br />
<input type="checkbox" name="myCheck[c]" value="Black" /> Valore C
<br />
<input type="submit" value="submit form" />
</form>
</p>
</body>
</html>
I would also create a button to increase the checkbox available, so having a button that gives me the ability to create value.
I do not know much php, I am learning, and I need a hand to write this code.
I thank those who can give me some help.
Though you need to change your form so that they all have the same name, just keep the values different and that above will grab whatever they checked and echo it back to the page. I am not sure what you mean with
I would also create a button to increase the checkbox available, so having a button that gives me the ability to create value.
If you mean you want them to be able to add their own input use <input type="text" name="value" maxlength="50" /> on your form and then in the php file use the same method...
I am writing the code that I have to change is code Virtuemart (Joomla module), is within the "Aggiungi Prodotto" I do not know if you have had occasion to use it.
Here, I would add a checkbox just after the section of "Categorie"of products. Every choice I make in my checkbox is added in the form of "Descrizione per Negozio", where I would also add a header for description.
As regards the checkbox button, I create it so that gives me the opportunity to add a new choice of its value in the checkbox, of course I must give the possibility to write the new value.
I enclose the image of the "new product".
Attachments
product2.png (41.63 KiB) Viewed 113 times
Last edited by exkenzo on Thu Jan 27, 2011 4:55 am, edited 1 time in total.
Sorry I am not sure what to do on that program you posted or the screenshot, I don't know what language that is. The way I just posted is the way I have always done it. Feel free to test it out so you can see how that works.