PHPackages                             g33kme/pquery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. g33kme/pquery

ActiveLibrary[Templating &amp; Views](/categories/templating)

g33kme/pquery
=============

PQuery is a simple PHP Wrapper for HTML/jQuery AJAX forms and AJAX links. Easy to use in your HTML views or templates.

v1.0.0(4y ago)04MITPHPPHP &gt;=7.1

Since Nov 5Pushed 4y ago2 watchersCompare

[ Source](https://github.com/g33kme/pquery)[ Packagist](https://packagist.org/packages/g33kme/pquery)[ Docs](https://geekme.com)[ RSS](/packages/g33kme-pquery/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PQuery
======

[](#pquery)

PQuery is a simple PHP Wrapper for HTML/jQuery AJAX forms and links. Easy to use in your HTML views or templates.

You can also use PQuery for HTML Forms and Links to update content on your loaded page via AJAX. You can simply inject content with forms and links to your HTML content.

You can also use PQuery as server side form validator.

1. Installation: PQuery
-----------------------

[](#1-installation-pquery)

This library is installable via [Composer](https://getcomposer.org/):

```
composer require g33kme/pquery
```

You can also simply manually include `source/pquery.php` from this repository to your project and use the PQuery PHP Class.

```
include('path/to/my/pquery.php');
```

Requirements
------------

[](#requirements)

This library requires PHP 7.1 or later and if you use Composer you need Version 2+.

You also need to add the [jQuery Framework](https://code.jquery.com/) to your HTML template

```

```

3. How to use PQuery
--------------------

[](#3-how-to-use-pquery)

Here we create a simple HTML Form where we can setup form elements that will be sent via PQuery to your ajax.php file.

### Create an AJAX HTML Form

[](#create-an-ajax-html-form)

```

     $url,
            'update' => $update,
            'type' => 'POST',
            'name' => 'myform_name',
            'id' => 'myform_id',
            'class' => 'myform_class'
        ));
    ?>

    Are your a Geek?

      Yes
      No
      Working on ...

    What is your name?
