Hi, I'm newbie and would like to know how I can pass the value of the placeholder to a variable ($ email)
<input type="text" class="form-control" placeholder="Email" = name=""/>
Hi, I'm newbie and would like to know how I can pass the value of the placeholder to a variable ($ email)
<input type="text" class="form-control" placeholder="Email" = name=""/>
There are a few ways you can pass the value of your input
.
As a beginner, I'll show you a very simple way. A default
<form action="serarquivo.php" method="post">
<label for="email">Email</label>
<input type="email" placeholder="email" name="email">
</form>
In your serarquivo.php you get your variable according to the
name
attribute of yourinput
<?php
$_email = $_POST['email'];
echo "O e-mail recebido foi ".$_email;
?>
There are a few ways to submit your form, which are:
Reference: link