Jump to content

Using Page Name


aztec

Recommended Posts

That's precisely what GET is doing. For example, if you were to go to home.php?pageName=Home,

 

this would automatically create the variable $_GET['pageName'], which would contain the value "Home". Likewise, going to page.php?variable=value, would result in the variable $_GET['variable']  = "value" being created.

 

So, you could use $pageName = $_GET['pageName'];

 

Is this what you mean?

 

-jm

Link to comment
https://forums.phpfreaks.com/topic/210471-using-page-name/#findComment-1098223
Share on other sites

Thanks for your input

 

It is not what I want to do but it appears from the input it can be done.

I want to pass an id number say id=1 to a standard php page ie index.php and place the id number into pagename.

Then I want to use that id number in a mysql query.

 $a_result = @mysql_query("SELECT id,first_name, fid, mid FROM table_x where id= '$page'

Where $page contains the id number.

Is this part possible using PHP

 

Regards

Link to comment
https://forums.phpfreaks.com/topic/210471-using-page-name/#findComment-1098238
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.