Hello.
Is there any other way for not using the submit button?
<?php
$user_choice = $_POST['font_styles'];
if ($user_choice == "font_style_1"){
$font = 'firstfont';
}elseif ($user_choice == "font_style_2"){
$font = 'secondfont';
}elseif ($user_choice == "font_style_3"){
$font = 'thiredfont';
}elseif ($user_choice == "font_style_4"){
$font = 'forthfont';
}
?>
<html>
<head>
<style>
h1 {
font-family = $font;
}
</style>
</head>
<body>
<form method='post'>
<select name="font_styles">
<option value="font_style_1">font_style_1</option>
<option value="font_style_2">font_style_2</option>
<option value="font_style_3">font_style_3</option>
<option value="font_style_4">font_style_4</option>
</select>
<input type="submit">
</form>
<h1>username</h1>
</body>
</html>
I want when a user opens the drop-down menu and chooses an option, the font of the <h1> tag changes and the user can see his/her name in that font to see if he/she wants to save changes or choose an other font.
But I dn't want any submit button to be there, I want the font of the <h1> tag changes just by selecting a drop-down option. Is it possible?