NameSilo

URL Parameters

Spaceship Spaceship
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 DomainsUnstoppable Domains
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
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back