Question:

How would I make my URL become an input with php

by  |  earlier

0 LIKES UnLike

I was wondering how I would do this. I would like to have a url input that changes what is displayed on the page.

I want to be able to put this into the browser:

http://mysite.com/number=6007

I want the page to be displayed to say:

"you have 6007 dollars"

therefore, the url gives the value of the variable (number).

please help me

 Tags:

   Report

2 ANSWERS


  1. http://uk2.php.net/manual/en/reserved.va...


  2. Add the page name and a question mark...

    http://mysite.com/mypage.php?number=6007

    Then in your PHP script, use the GET method...

    echo $_GET["number"];

    That should do it.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.