Meta Tags Generator Using PHP
In this lesson we are going to learn how to create meta tags generator using php..Meta Tags Generator Using PHP |
index.php
<style> input[type=text]{ padding:5px; border-radius:4px; } input[type=submit]{ padding:7px; background:black; color:white; border-radius:4px; } textarea{ border-radius:4px; text-align:left; } </style> <form method="POST" action=""> <table> <tr> <td>Title</td> <td><input type="text" name="title"/></td> </tr> <tr> <td>Description</td> <td><textarea name="description" rows="5" cols="23"></textarea></td> </tr> <tr> <td>Keywords</td> <td><textarea name="keywords" rows="5" cols="23"></textarea></td> </tr> <tr> <td>Author</td> <td><input type="text" name="author"/></td> </tr> <tr> <td></td> <td><input type="submit" name="submit" Value="Generate Meta Tag"/></td> </tr> </table> </form> <?php if(isset($_POST['submit'])){ $title=$_POST['title']; $description=$_POST['description']; $keywords=$_POST['keywords']; $author=$_POST['author']; //Generating Meta Tags ?> <textarea rows="10" cols="60"><meta name="title" content="<?php echo $title;?>"> <meta name="description" content="<?php echo $description;?>"> <meta name="keywords" content="<?php echo $keywords;?>"> <meta name="author" content="<?php echo $author;?>"> </textarea> <?php } ?>
Your Output will be something like below..
Meta Tags Generator Using PHP |
No comments:
Post a Comment
Thank You for Your Comment
Note: Only a member of this blog may post a comment.