473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to get current html page's title using PHP?

Hi All,

I want to get the current page title using PHP.

I tried "var $subject_title =(document.title);" javascript code, but could not get this in PHP code.

Can anyone help me for this.

Please let me know if you want more information on this.


Thanks in advance!
Feb 4 '15 #1
1 1329
Claus Mygind
571 512MB
Since the "submit" button transmits the controls on a form in the form of an array, why don't you just code an id into the form. Then that can be recovered by the "$_REQUEST" on your php side.

It almost seems however you are trying to execute php on the client side, which of course cannot be done. It only executes on the server side.

To use javaScript, you simply do this
Expand|Select|Wrap|Line Numbers
  1. var x = document.title;
  2.  
You can read more about that here?
http://www.w3schools.com/jsref/prop_doc_title.asp
Feb 5 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
10
by: Kenny Ashton | last post by:
Hi all Can anyone tell me the best way to set permissions to allow an ASP program to write new Html pages to my site's root folder, without chancing users also being able to write to the root....
1
by: Chung | last post by:
Hi I have create a ActiveX control in c# and I have successfully using My_control.dll in a html page by using the following html code: <html> <head> <title>ActiveX Controls Example</title>...
4
by: Igor K | last post by:
Hi all, I'm developing asp.net website. Most of the pages are aspx, but let's say, some 10% are html. For this html pages i use httphandlers to intercept calls and to perform some job on this...
2
by: Vaibhav Shah | last post by:
Hi, Can we secure HTML pages on a web site using asp.net? We have a requirement in which we want to display a login page before a visitor can view any HTML page on our website. WE have...
1
by: jainamber | last post by:
Hi, We are in the process of launching a new asp.net site for our client, the old site was pure html. In order to preserve the search engine rankings of the html pages, I am trying to implement ...
10
by: sindhu | last post by:
hello there, as the title ggoes, i want to pass values btn html pages in the same frame. i've two framesets, top frmeset and bottom set, in the bottom frameset there are three frames, frame1,frame2...
13
by: sindhu | last post by:
Hello acoder. I want to know another type of passing values between pages I have three frames frame1 for main horizontal menu frame 2 for vertical submenu frame 3 which is is loaded based on...
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.