Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 1, 2026.

URL Parameters

Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
Watch

Barrucadu

Established Member
Impact
64
How do i get a URL parameter using PHP, I know how to submit one but not how to get it on another page. e.g. on my image hosting site when you click browse it takes you to /Uploads/browseupload.php?file=filename.filextension and all i want to do is be able to use the file parameter to display the image. I have it all worked out except for recieving the parameter.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Use

PHP:
$_GET['url_param_name']

/Uploads/browseupload.php?file=filename.filextension
would be

PHP:
$_GET['file']
 
0
•••
thanks
 
0
•••
You forgot semicolons! Make sure you add those!!
 
0
•••
I would use semicolons, but I am not writing a full line of code. Those are just examples

Just for kicks though
PHP:
echo 'Filename Is ' .  $_GET['file'];

=P
 
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back