Is this PHP?

I want to get the values from the URL

Page 1 of 1

10 Replies - 875 Views - Last Post: 22 December 2010 - 11:55 PM Rate Topic: -----

#1 tristrella  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-December 10

Is this PHP?

Posted 22 December 2010 - 10:07 PM

Hi,

Can someone investigate the structure of this URL?

http://www.domain.com/thank-you.html?Company=SampleCompany&Country=Taiwan&Email=myemail%40gmail.com


I want to get the value of the Company, Country, and the Email.

For example on thank-you.html, I want to display it as,

---------------------------------
Hi myemail@gmail.com,

Your're company is SampleCompany and you are in Taiwan.
------------------------------------------

I want to display the values in the url to the actual page. Could someone give advise?

This post has been edited by tristrella: 22 December 2010 - 10:08 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Is this PHP?

#2 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5296
  • View blog
  • Posts: 27,178
  • Joined: 10-May 07

Re: Is this PHP?

Posted 22 December 2010 - 10:14 PM

Those values are in the GET array : have a read over this tutorial which outlines GET & POST arrays.
Was This Post Helpful? 0
  • +
  • -

#3 tristrella  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-December 10

Re: Is this PHP?

Posted 22 December 2010 - 10:30 PM

View Postno2pencil, on 22 December 2010 - 09:14 PM, said:

Those values are in the GET array : have a read over this tutorial which outlines GET & POST arrays.


But I think this is not in PHP since the extension is .html
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5296
  • View blog
  • Posts: 27,178
  • Joined: 10-May 07

Re: Is this PHP?

Posted 22 December 2010 - 10:31 PM

You are correct. Again, if you want to use PHP to read them at the server, then you'll need to gather the values in the GET array.
Was This Post Helpful? 0
  • +
  • -

#5 tristrella  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-December 10

Re: Is this PHP?

Posted 22 December 2010 - 10:35 PM

But is it possible to pull the datas on a plain html one?

View Postno2pencil, on 22 December 2010 - 09:31 PM, said:

You are correct. Again, if you want to use PHP to read them at the server, then you'll need to gather the values in the GET array.

Was This Post Helpful? 0
  • +
  • -

#6 tristrella  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-December 10

Re: Is this PHP?

Posted 22 December 2010 - 10:47 PM

Is it possible to acquire the values without PHP codings?
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5296
  • View blog
  • Posts: 27,178
  • Joined: 10-May 07

Re: Is this PHP?

Posted 22 December 2010 - 11:02 PM

PHP functions on the server, Javascript functions on the browser. You would have to parse the URL through Javascript in order to use them without using PHP. This presents a problem. The user could simply edit the URL as they wished.
Was This Post Helpful? 0
  • +
  • -

#8 tristrella  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 22-December 10

Re: Is this PHP?

Posted 22 December 2010 - 11:03 PM

Do you have some links to tutorials? I'm a newbie :-)

View Postno2pencil, on 22 December 2010 - 10:02 PM, said:

PHP functions on the server, Javascript functions on the browser. You would have to parse the URL through Javascript in order to use them without using PHP. This presents a problem. The user could simply edit the URL as they wished.

Was This Post Helpful? 0
  • +
  • -

#9 prab97  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-October 10

Re: Is this PHP?

Posted 22 December 2010 - 11:37 PM

Doesn't anyone of you know about mod_rewrite for Apache? It might be a PHP inside, if they have used mod_rewrite to rewrite the thank-you.html request to what-ever.php.

Get the very basic tutorial here:

http://www.workingwi...ing/mod_rewrite

This post has been edited by prab97: 22 December 2010 - 11:38 PM

Was This Post Helpful? 0
  • +
  • -

#10 JannuBl22t  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 31
  • Joined: 22-December 10

Re: Is this PHP?

Posted 22 December 2010 - 11:38 PM

Well it's really easy to use any kind of end for your files if you want to use PHP. All you need to do is create a little .htaccess file:

RewriteEngine On
RewriteRule myfile.png myfile.php


Then you can use http://myurl.com/myf...ng?do=something and it acts like a PHP file because it is a PHP file, but masked.
Was This Post Helpful? 1
  • +
  • -

#11 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5296
  • View blog
  • Posts: 27,178
  • Joined: 10-May 07

Re: Is this PHP?

Posted 22 December 2010 - 11:55 PM

View Postprab97, on 23 December 2010 - 12:37 AM, said:

Doesn't anyone of you know about mod_rewrite for Apache?

When someone asks a question about file extensions... I don't usually jump right into server-side apache modules solutions.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1