I achieved it by using the PHP |
Example:
HTML
<form name="car_form" method="post" action="doublevalue_action.php">
<select name="car" id="car">
<option value="">Select Car</option>
<option value="BMW|Red">Red BMW</option>
<option value="Mercedes|Black">Black Mercedes</option>
</select>
<input type="submit" name="submit" id="submit" value="submit">
</form>
Example:
PHP
<?php
$result = $_POST['car'];
$result_explode = explode('|', $result);
echo "Model: ". $result_explode[0]."<br />";
echo "Colour: ". $result_explode[1]."<br />";
?>
How to crearte HTML textarea auto expand height | HTML Form Tutorial |
How to use multiple values in HTML Select Option Tag? | HTML Form Tutorial |
Read Full: | HTML Form Tutorial |
Category: | Web Tutorial |
Sub Category: | HTML Form Tutorial |
Uploaded: | 3 months ago |
Uploaded by: | Admin |
Views: | 10 |
Tested on: | HTML |
Ref on: | View |