Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
You can check using extensions. The Google Tag Assistant for Chrome is easy to use and also to understand. It’s not perfect but it does quickly alert the issues . There is also a Google Analytics Debugger extension that provides a similar kind of service by focusing on GA tracking. In a Similar manner Facebook has introduced the Pixel Helper extension, which helps to to know that conversion tracking is working correctly.
<?php
if(isset($_POST['submit'])){
// Fetching variables of the form
$name = $_POST['name'];
$email = $_POST['email'];
if($name !=''&& $email !=''&& $contact !='')
{
// To redirect form on a particular page
header("Location:https://www.example.com/success.php/");
}
else { ?>
<span>
<?php echo "Please fill all fields.";?>
</span>
<?php } } ?>
You can try my code.It’s working for me.
<?php
// IF WE ARE ON HOMEPAGE
if(Mage::getSingleton(‘cms/page’)->getIdentifier() == ‘home’ &&
Mage::app()->getFrontController()->getRequest()->getRouteName() == ‘cms’
) : ?>
// Slider/Banner Code Block
<?php endif; ?>
If you are using Gmail id you have to turn on the access for less secure apps. Otherwise, you’ll not get an email.
Please follow the below steps.
The function gets() reads a line from stdin and stores them as a string into str until a newline character or the end-of-file is reached.
gets( <your variable-name> )
Demo code:
#include <stdio.h>
int main()
{
char str[100];
printf("Enter a website url: ");
gets(str);
printf("Website url: %s", str);
return(0);
}
Result of the above program:
Enter a website url: http://avianceschool.com
Website url: http://avianceschool.com
getch() : the function is used to accept single character from user, but it has no echo (display) on screen when it is pressed.
getche() : the function is used to accept single character from user, and it has echo (display) on screen when it is pressed.
One of the most common mistake that a programmer can make is to confuse the equal sign (=) with a double equal signs (==).
When we wish to assign a value to a variable or member, we use the equals sign (=).
For example:
x = 1 + 4; // assignment operation
When we wish to make a comparison, such as in an if statement, we use the double equals sign (==).
For example:
if ( x == y ) { System.out.println ("Match found!"); } // comparison
#include <stdio.h>
void main()
{
int num,rem,bin_val, dec_val = 0, base = 1;
printf("Enter a binary number(1s and 0s) \n");
scanf("%d", &num);
bin_val = num;
while (num > 0)
{
rem = num % 10;
dec_val = dec_val + rem * base;
num = num / 10 ;
base = base * 2;
}
printf("The Binary number is = %d \n", bin_val);
printf("Decimal equivalent is = %d \n", dec_val);
}
Manually wipe a drive and convert it to GPT:
{i}Turn off the PC, and put in the Windows installation DVD or USB key.
{ii}From inside Windows Setup, press Shift+F10 to open a command prompt window.
{iii}Type
diskpart
and hit Enter.{iv}Next type
list disk
and hit Enter.{v}The list of disks will be displayed. Select the disk and type the following command and hit Enter, replacing x with the number of your disk you want to clean. The disk will have GPT marked against it.
select disk x
{vi}The disk will be selected.Next type clean and hit Enter. Remember that, once you run this command, all data on the disk will be lost.So if you need to, take backups of your data.You will now have to convert GPT to MBR using Diskpart.
You will get idea from https://bitpay.com/integrations/
The easiest way to integrate Paypal payment to your website is by integrating direct Paypal Buy Now button. It is simply adding a code in your HTML page.
Here is the sample HTML CODE:
<form name=”_xclick” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick”>
<input type=”hidden” name=”business” value=”me@mybusiness.com”>
<input type=”hidden” name=”currency_code” value=”USD”>
<input type=”hidden” name=”item_name” value=”paypal integration”>
<input type=”hidden” name=”amount” value=”29.00″>
<input type=”image” src=”http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif” border=”0″ name=”submit” alt=”Make payments with PayPal – it’s fast, free and secure!”>
</form>
Get HTML code for your website
Standard Web Order HTML Form
<form id="weborder" name="weborder" method="post" action="https://secure.quantumgateway.com/cgi/web_order.php">
Widget ABC $99
<input name="item_qty" type="text" id="item_qty" value="1" size="5" />
<input type="submit" name="Submit" value="Buy" />
<input name="gwlogin" type="hidden" value="your_gateway_login">
<input name="post_return_url_approved" type="hidden" value="http://www.mydomain.com/approved.html">
<input name="post_return_url_declined" type="hidden" value="http://www.mydomain.com/declined.html">
<input name="item_description" type="hidden" value="One year subscription to http://www.mydomain.com">
<input name="override_email_customer" type="hidden" value="Y">
<input name="override_trans_email" type="hidden" value="Y">
<input name="item_cost" type="hidden" value="99" />
</form>
Get session data:
$this->session->userdata('USERID');
To add custom session data:
$session_data = array('USERID' =>"11",'USERNAME' =>"AVIANCE",'PASSWORD' =>"12345");
$this->session->set_userdata($session_data); // $session_data is an associative array of a USER information
To remove all session data:
$this->session->unset_userdata('USERID'); // Removing values from session
CodeIgniter Hooks allows you to execute a script with specific path within the CodeIgniter execution process without updating or modifying the core files.
If you need to execute a code that should run every time after Constructor of a controller is loaded, you specify that script path in hooks.
Hooks is a PHP file located in following path
application/config/hooks.php
The different types of hooks are:
{i} post_controller_constructor
{ii} pre_controller
{iii} pre_system
{iv} post_system
{v} cache_override
{vi} display_override
{vii} post_controller
You can try this
The file Message.php in application/libraries:
class Message{
function display_message()
{
return 'Welcome to my Dashboard';
}
}
Controller dashboard.php in application/controllers
class Dashboard extends CI_Controller
{
function index()
{
$this->load->library('message');
echo $this->message->display_message();
}
}
you can use $this->db->insert_id();
public function insert_data($data)
{
$this->db->insert("table name",$data);
$lastID = $this->db->insert_id();
return $lastID;
}
Simply download and copy the plugin into the root directory of your server,enter credentials in your admin panel & you are done.
Step1: Download Paytm Payment Gateway PHP Kit
First you have to download Paytm Payment Gateway PHP Kit from given link. You need to copy PaytmKit folder in document root of your server.
Step2: Update Paytm Gateways Configuration
Now open config_paytm.php file from the PaytmKit/lib folder and update the below constant values:
{i} PAYTM_MERCHANT_KEY – Can be downloaded from the Paytm portal. One time downloadable
{ii} PAYTM_MERCHANT_MID – MID (Merchant ID) can be collected from Paytm team
{iii} PAYTM_MERCHANT_WEBSITE – Website name can be collected from Paytm team
define('PAYTM_ENVIRONMENT', 'TEST'); // PROD
define('PAYTM_MERCHANT_KEY', 'xxxxxxxxxx'); // Merchant key received from Paytm
define('PAYTM_MERCHANT_MID', 'xxxxxxxx'); // MID (Merchant ID) received from Paytm
define('PAYTM_MERCHANT_WEBSITE', 'xxxxxxxxxx'); // Website name received from Paytm
3.PaytmKit folder is having following files:
{i} TxnTest.php – Testing transaction through Paytm gateway.
{ii} pgRedirect.php – This file has the logic of checksum generation and passing all required parameters to Paytm PG.
{iii} pgResponse.php – This file has the logic for processing PG response after the transaction processing.
{iv} TxnStatus.php – Get the transaction status from API