Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

UPDATE REQUEST METHODS #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

UPDATE REQUEST METHODS #183

wants to merge 1 commit into from

Conversation

MrDGI
Copy link

@MrDGI MrDGI commented Feb 16, 2017

Add methods _GET _POST _REQUEST

Requirements

Code tested for my in Atom 1.14.2

Description of the Change

Add _GET, _POST and _REQUEST

Alternate Designs

Know memory code or know it before

Benefits

Improvement for to noobs in php

Possible Drawbacks

Do put $ before calling _POST, is important

Applicable Issues

No problems

Add methods _GET _POST _REQUEST
@50Wliu
Copy link
Contributor

50Wliu commented Feb 16, 2017

These snippet prefixes are very unfriendly. You should try to keep them alphanumeric-only (ie, what about get, post, and request?)

@MrDGI
Copy link
Author

MrDGI commented Feb 16, 2017

They are the way to collect the data of any formulary, completely necessary, the programmer will make its filters before working with the received data.

@MrDGI
Copy link
Author

MrDGI commented Feb 16, 2017

snippets/language-php.cson, add text:

'$_POST …':
'prefix': '_POST[""]'
'body': '_POST["${0:INPUT NAME}"];'
'$_GET …':
'prefix': '_GET[""]'
'body': '_GET["${0:INPUT NAME}"];'
'$_REQUEST …':
'prefix': '_REQUEST[""]'
'body': '_REQUEST["${0:INPUT NAME}"];'

Copy link
Contributor

@Ingramz Ingramz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are scoped incorrectly, they should be under .source.php.

@MrDGI
Copy link
Author

MrDGI commented Feb 16, 2017

I test and running...
PHP:

      <?php
        $miname = $_POST["pepe"];
        echo "Hello ".$miname." !";
      ?>

HTML:

      <form method="post" action="basic.php">
        <label for="myname"></label>
        <input type="text" id="myname" name="pepe">
      </form>

sin titulo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants