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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <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.