• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

What is the difference between client-side and server-side programming?

javascriptphpclient-sideserver-side


PHP Snippet 1:

<script type="text/javascript">
    var foo = 'bar';
    <?php
        file_put_contents('foo.txt', ' + foo + ');
    ?>

    var baz = <?php echo 42; ?>;
    alert(baz);
</script>

PHP Snippet 2:

<script type="text/javascript">
    var foo = 'bar';

    var baz = 42;
    alert(baz);
</script>

Related Snippets

WAMP Virtual Host not working

How to send image,audio or video through the WhatsApp API - PHP

Change user role if checkout custom checkbox is checked in WooCommerce

Two buttons one form

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

Two buttons one form

Filter WooCommerce related products by Polylang language

PHP sort array of objects by two properties

Why do I have invalid argument supply for foreach in Laravel for json response? [duplicate]

How to find phpcs current default standard

How can I stop a symfony process which is listening on http://127.0.0.1:8000

How to get Laravel's CSRF Token from Another Website?

How can i call a function that executes an fpdf based on the choice of a form selector?

If you intend you use SMTP, add your SMTP Code after this Line

Spam Filter in Contact Form

About Contact Privacy policy Terms and conditions