What is this “<span class=” for ?
What does it mean span and what class got to do with anything ?
[code]
<form method=”post” action=”<?php echo htmlspecialchars($_SERVER[“PHP_SELF”]);?>”>
Name: <input type=”text” name=”name”>
<span class=”error”>* <?php echo $nameErr;?></span>
<br><br>
E-mail:
<input type=”text” name=”email”>
<span class=”error”>* <?php echo $emailErr;?></span>
<br><br>
Website:
<input type=”text” name=”website”>
<span class=”error”><?php echo $websiteErr;?></span>
<br><br>
Comment: <textarea name=”comment” rows=”5″ cols=”40″></textarea>
<br><br>
Gender:
<input type=”radio” name=”gender” value=”female”>Female
<input type=”radio” name=”gender” value=”male”>Male
<input type=”radio” name=”gender” value=”other”>Other
<span class=”error”>* <?php echo $genderErr;?></span>
<br><br>
<input type=”submit” name=”submit” value=”Submit”>
</form>
Unlike the tutorial, I didn’t use the “<span class =” to make space to echo error on the input field like w3schools tutorial did.
I echoed the input error like following without using this “<span class=” thing.
[code]
<label for=”email_domain”>@ <b>*</b></label>
<input type=”domain” name=”email_domain” id=”email_domain” value=”<?php if(ISSET($_SESSION[’email_domain’])) { echo $_SESSION[’email_domain’]; } ?>” required> <?php if(ISSET($_SESSION[’email_2b_error’])) { if($_SESSION[’email_2b_error’] != ”) { echo $_SESSION[’email_2b_error’]; }} ?>