PHP Classes

How to Display PHP Contact Buttons to Let Site Users Contact the Site Manager Using the Package PHP Contact Page: Show contact buttons for WhatsApp, Facebook, Email

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-07-01 (2 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
php-contact-page 1.0BSD License5HTML, PHP 5, User Management
Description 

Author

This package can show contact buttons for WhatsApp, Facebook, Email.

It can take the current site contact details and show buttons to let site users contact the site manager.

The text of the contact buttons and messages can be changed to adapt to a given language.

The contact button images and the CSS styles of the contact buttons list can be customized to change the appearance and position on the page.

Currently, it supports showing buttons contact the site manager using:

- WhatsApp given the contact number

- Facebook manager given the contact identifier number

- Email given the contact email address

Picture of Manuel Lemos
  Performance   Level  
Name: Manuel Lemos is available for providing paid consulting. Contact Manuel Lemos .
Classes: 46 packages by
Country: Portugal Portugal
Age: 56
All time rank: 1
Week rank: 7 Down1 in Portugal Portugal Equal

Instructions

Example

<?php

   
require('ContactPage.php');

   
$contact_email_address = 'mlemos@gmail.com';
   
$contact_whatsapp = '5514998068719';
   
$contact_facebook_messenger = '114418241923267';
   
   
$contact_page = new \PhpContactPage\ContactPage;
   
$contact_page->contactEmailAddress = $contact_email_address;
   
$contact_page->contactFacebookMessenger = $contact_facebook_messenger;
   
$contact_page->contactWhatsApp = $contact_whatsapp;
   
$contact_page->cssStyle = 'position: fixed; bottom: 0px; right: 32px; z-index: 16777271;';
   
$contact_page->cssClass = '';
   
$contact_page->icons = array(
       
'mail'=>'<img src="Email.png">',
       
'FacebookMessenger'=>'<img src="FacebookMessenger.svg">',
       
'WhatsApp'=>'<img src="WhatsApp.svg">'
   
);
   
$contact_page->texts = array(
       
'Contact-us-using-email'=>'Contact us using email',
       
'Contact-us-using-Messenger'=>'Contact us using Facebook Messenger',
       
'Contact-us-using-WhatsApp'=>'Contact us using WhatsApp',
       
'Hello-I-visited-your-site-and-I-need-your-help'=>'Hello, I visited your site and I need your help.'
   
);
    if(
$contact_page->initialize()
    &&
$contact_page->process()
    &&
$contact_page->process(true))
    {
       
$output = '<h2>Look at the contact button bar at the bottom right corner of this page. -&gt;</h2>'.$contact_page->output();
    }
    else
       
$output = 'Error: '.HtmlSpecialChars($contact_page->error);
?>
<html>
<head>
<title>Test Contact Page Example</title>
</head>
<body>
<h1>Test Contact Page Example</h1>
<hr>
<?php

   
echo $output;
   
?>
<hr />
</body>
</html>


Screenshots (1)  
  • documentation/screenshots/Test-Contact-Page-Example-2025-07-01.png
  Files folder image Files (6)  
File Role Description
Plain text file ContactPage.php Class Class source
Accessible without login Image file Email.png Icon Icon image
Accessible without login Plain text file FacebookMessenger.svg Data Auxiliary data
Accessible without login Plain text file test_contact_page.php Example Example script
Accessible without login Plain text file WhatsApp.svg Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0