Search
 
SCRIPT & CODE EXAMPLE
 

PHP

How to create and access angular HTTP params in PHP

//Crreating HTTP params
//e.g. http://localhost/api/something.php?title=value&content=value
let httpParams = new HttpParams()
  .set('title', this.createNewForm.controls['title'].value)
  .set('content', this.createNewForm.controls['content'].value);

//Then pass the Http params object to the http.get) method
this.http.get('http://localhost/api/something.php', {httpParams}).then();

//Accessing these parameters in PHP
$title = $_GET['title'];
$title = $_GET['content'];
Comment

PREVIOUS NEXT
Code Example
Php :: how to add page link in laravel 
Php :: woocommerce php product gallery change to carousel 
Php :: docker : from php alpine 
Php :: instalar php 7.4 no ubuntu 
Php :: french special characters php 
Php :: laravel where not equal 
Php :: new DateInterval 1 hour 
Php :: The `php` command cannot be found. Please verify that PHP is installed, or set the `php.executables` setting. 
Php :: php array_intersect 
Php :: update profile method in laravel 
Php :: declare empty array in php 
Php :: spatie laravel activity log 
Php :: woocommerce change add to cart button text 
Php :: laravel test mail 
Php :: create migration with model laravel 
Php :: php write to standard out 
Php :: ubuntu apache php version 
Php :: how to read from temp files php 
Php :: how to get previous date in laravel 
Php :: php passing variables axios 
Php :: maintenance mode laravel 
Php :: function in php 
Php :: laravel get route parameters in blade value 
Php :: variavel de variavel php 
Php :: laravel elequent query 
Php :: get data from 2 table in response laravel 
Php :: foreign key cosntraint laravel 
Php :: apache using wrong php version 
Php :: laravel auth setup 
Php :: windows logged in user name in php 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =