How to Create an Awesome Name Wishing Festival Web App in PHP?


@yunus Create Database Tables?


sir google+ or facebook share button ka bhi code dona please


sir google+ or facebook share button ka code bhejona



<a href="<?php echo 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; ?>" target="_blank">Facebook</a>

Google +

<a href="<?php echo  'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; ?>" target="_blank">Google+</a>


You can also simply implement “addthis” instead of seperately implementing share buttons


Personally, I love Custom Share Buttons :slight_smile:


Sir isme kuch changes karna hai know kya


Agar isme kuch changes karna hai to please bataona


sir ye live kam nhi kar raha hai maine apne website par upload kiya to index.php ke age nhi bad raha hai sirf blank page open ho raha hai sir please please help me


did you set up the database? create table?


Sir table bhi banaya table me name bhi araha Hai but display nhi ho raha Hai pura page blank show ho raha hai


update your database username, password, and table name on db.php??


Bro, kindly please translate in English if possible, so that it reaches everyone here and we’ll try our best to share our inputs as well. :slight_smile:


[Htaccess and Security Update]

Updated File


Prevent XSS Attack

  • open index.php file find this line $title=htmlentities($title);
  • Replace it with below function
//Prevent XSS
$title = htmlspecialchars($title,ENT_COMPAT);

Updated index.php File


Plugin Name: MSK Festival Wishes Web App
Plugin URI:
Description: Festival Wishes Web App - A PHP Plugin Which Helps us to Create an Awesome SEO Friendly Festival Event Wishing Web App with Custom Greeting Wishes Page.
Version: 1.2
Author: Santhosh veer
Author URI:
License: GPLv2 or later
License URI:



//prevent sql injection

//prevent xss
$title = htmlspecialchars($title,ENT_COMPAT);

//friendly URL conversion
function to_prety_url($str){
    if($str !== mb_convert_encoding( mb_convert_encoding($str, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32') )
        $str = mb_convert_encoding($str, 'UTF-8', mb_detect_encoding($str));
    $str = htmlentities($str, ENT_NOQUOTES, 'UTF-8');
    $str = preg_replace('`&([a-z]{1,2})(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\1', $str);
    $str = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
    $str = preg_replace(array('`[^a-z0-9]`i','`[-]+`'), '-', $str);
    $str = strtolower( trim($str, '-') );
    return $str;

// sql query for inserting data into database
$sql_query = "INSERT INTO event_wishes (title,str) VALUES ('$title','$str')";

// Redirect to Greeting Page
//Replace http://localhost/$str with your Greeting WEB APP URL
header("Location: http://localhost/$str");



<!DOCTYPE html>
<html lang="en" itemscope itemtype="">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php $current_page = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
 echo '<link rel="canonical" href="'.$current_page.'" itemprop="url"/>'; ?>

<!-- Edit the Meta Tags Add your Own Meta Contents  -->
<!-- Seo Meta Tags -->
<title>Mskian Festival Wishes Web App</title>
<meta name="description" content="Create an Awesome Name Wishing Festival Web App."/>
<meta name="robots" content="index,follow">
<link href='YOUR FAVICON URL' rel='icon' type='image/x-icon'/>

<!-- Twitter Card data -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Mskian Festival Wishes Web App" />
<meta name="twitter:description" content="Create an Awesome Name Wishing Festival Web App." />
<meta name="twitter:image" content="THUMBNAIL IMAGE FOR TWITTER SHARE" />
<meta name="twitter:site" content="@yourtwitterusername" />
<meta name="twitter:creator" content="@yourtwitterusername" />

<!-- Facebook Open Graph data -->
<meta property="og:title" content="Mskian Festival Wishes Web App" />
<meta property="og:type" content="website"/>
<meta property="og:url" content="YOUR WEB APP URL" />
<meta property="og:image" content="THUMBNAIL IMAGE FOR FACEBOOK SHARE" />
<meta property="og:description" content="Create an Awesome Name Wishing Festival Web App." /> 
<meta property="og:site_name" content="YOUR SITE NAME" />
<meta property="fb:app_id" content="APP ID" />

<!-- Google+ Meta Tags. -->
<meta itemprop="name" content="Mskian Festival Wishes Web App">
<meta itemprop="description" content="Create an Awesome Name Wishing Festival Web App.">
<meta itemprop="image" content="THUMBNAIL IMAGE FOR GOOGLE+ SHARE">

<link href="" rel="stylesheet">
<link href=',700' rel='stylesheet' type='text/css'>

<style type="text/css">
    body {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;

    font-size: 2.3em;
    font-weight: 600;
    margin: 20px 0 10px 0;
    letter-spacing: -1px;

.login-form {
    margin: 0 auto !important;
    float: none;
    padding: 15px;

.login-form form.form-horizontal {
    padding: 10px 20px;

    font-weight: 700;

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src=""></script>
      <script src=""></script>

<br />
<br />

<div class="col-md-6 col-lg-5 col-sm-8 center-block well login-form">
<h2 class="no-margin text-center">Create Greeting</h2>
<div class="clearfix">&nbsp;</div>
<form method="post" class="form-horizontal" data-parsley-validate>
<div class="form-group">
<input type="text" class="form-control" name="title" placeholder="Your Name" data-parsley-required="true">
<div class="form-group">
<button type="submit" name="create-wish" class="btn btn-success btn-block btn-lg">Create Wish</button>
<div class="clearfix">&nbsp;</div>

<!-- JavaScript -->
<script src=""></script>
<script src=""></script>
<script src=""></script>

  • db.php

    $dbhost = 'localhost';
    $dbuser = 'YOUR DB USER';
    $dbpass = 'YOUR DB PASS';
    $dbname = 'YOUR DB NAME';

    $con=mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) //connect to the database server
    or die ("Could not connect to mysql because ".mysqli_error());
    mysqli_query($con, "SET NAMES 'utf8'");
    mysqli_select_db($con,$dbname)  //select the database
    or die ("Could not select to mysql because ".mysqli_error());

  • .htaccess
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ userwish.php?str=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ userwish.php?str=$1

If you are already using this Wish Script - Update the index.php, db.php and .htaccess file.

Github -


Sir i have made the site but i want to configure the frontend of my choice but sit u have made class attribute so from where i can change the style css of the web app and the background of it.


add the background color on body class

body {
    background-color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
  • Replace #ffffff with your color code


Fix 404 Page Redirection

If you are Facing a 404 Error while redirecting to wish page follow this Method to Fix the 404 Page Error.

  • Open .htaccess file
  • Remove the default SEO Friendly rewrite rule & Add this Below rule to Fix the Greeting page displaying the 404 Error
RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z0-9_-]+)$ userwish.php?str=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ userwish.php?str=$1


Happy New year Name Wishing Web APP :100: - [ Available on Github - Free & Open Source ] :slight_smile:

Contribute? - Fork & Send Pull Request :electric_plug:

Add Social Profile Icons Without Plugin on Wordpress

@pradeepkumar bro I want to Update the Post bro I can’t the edit this post :roll_eyes:


I wouldn’t recommend using mysql for such simple site.
Also even if you’re using mysql, why “mysqli” even which have been long deprecated, use PDO instead.
And always use ENT_QUOTES to escape the XSS protection along with XSS block header.

Cheers! :slight_smile: