Input type checkbox with image [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I'm wondering how can I make checkbox image with html that I can send it with php to email. Or how can I target that image in checkbox with php?
I want that to be like small shop, that you can click on image and send it to email and ask for price.
Here is my tiny code:
<form>
<label>
<img src="https://upload.wikimedia.org/wikipedia/hr/thumb/5/55/Avatar_2009.jpg/220px-Avatar_2009.jpg">
<input type="checkbox" id="box">
</label>
<input type="submit" value="ask for price">
</form>

You can create another label and use for
TRY THIS:
<form>
<label for="box">
<input type="checkbox" id="box">
<img src="https://upload.wikimedia.org/wikipedia/hr/thumb/5/55/Avatar_2009.jpg/220px-Avatar_2009.jpg">
</label>
<input type="submit" value="ask for price">
</form>

Related

How to automatically send emails in html [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am making a form and I want it to email me whenever somebody completes it. Does anybody know if this can be done in HTML alone or if this has to utilize something more? So basically I want to know if it is possible for when a button is pressed, if that can send an email. Thank You!
<form action="mailto:yourmailadress#xxx.com?Subject=Mail Subject" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name"><br>
E-mail:<br>
<input type="text" name="mail"><br>
Comment:<br>
<input type="text" name="comment" size="50"><br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
This is the process of sending mail that can be done with html without using a different language.

How Can I Show Rows With Multi Select? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to show my records multi selectable. Like this: http://i.imgur.com/aR9WuON.png
Then i will make buttons for "delete selected items", "edit selected items" e.t.c.
So, how can ?
Define your check box as array(name="check_list[]"). So it will store multiple vales on it. Then use foreach loop and do your needs
<input type="checkbox" name="check_list[]" value="PHP"><label>PHP</label><br/>
<input type="checkbox" name="check_list[]" value="CSS"><label>CSS</label><br/>
<input type="checkbox" name="check_list[]" value="HTML"><label>HTML</label><br/>
as well as check this example too

How to check and assign values in PHP? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I'm new to PHP. I want to retrieve the value from my checkboxes in PHP and read it.
HTML
<input type="radio" NAME="andras">Male
<input type="radio" NAME="andras">Female
PHP
$number= array($_POST['andras']);
$fylo=$number[$i];
You need to use the value attribute to give values to the buttons.
<input type="radio" name="andras" value="male">Male
<input type="radio" name="andras" value="female">Female
Then in the PHP, $_POST['andras'] will contain either male or female.

how to use a common validation for all input fields in a page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
i have 61 fields in a page, i need input validation , if any one leaves a field blank and enter submit then a error message should show. because i can`t code for every single field validation, quite lengthy. numeric field should accept only numbers, here the field is "phn_no". i am just showing only 2 fields. thank you folks.
<form action="save.php" method="post">
<input type="text" name="name" id="name">
<input type="text" name="phn_no" id="phn_no">
<input type="submit" value="save" name="submit">
</form>
Use input like this
<input type="text" name="name" id="name" required>
required field must be fill then only we submit the form otherwise it display notification.

Change checkbox to be unchecked by default [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have the following code, which is at the end of a form, and asks visitors if they would like to sign up for a newsletter. Currently the checkbox is checked by default, but I would like to change it so it is UNchecked by default. I have tried changing it to checked="unchecked", but it's not working. I am a newbie, so please be detailed - and patient! Thank you!
<p>
<label for="newsletter" style="width: 53%;margin-left: 120px;">
<input type="checkbox" name="cd_request[newsletter]" value="1" checked="checked" id="newsletter">
I would like to receive email updates
</label>
</p>
You simply remove the checked attribute completely.
Like:
<input type="checkbox" name="cd_request[newsletter]" value="1" id="newsletter">
and your full code would look like this:
<p>
<label for="newsletter" style="width: 53%;margin-left: 120px;">
<input type="checkbox" name="cd_request[newsletter]" value="1" id="newsletter">
I would like to receive email updates
</label>
</p>
You can get a better understanding of the <input> element from here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#Attributes
You'll notice the checked attribute also does not need to say checked="checked" it can simply be checked.

Categories