473,386 Members | 1,710 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,386 software developers and data experts.

Passing the query string to a *.html file

Chittaranjan
Hi All,

I was wondering if it is possible to pass a query string to an html file.

I mean to say as we have seen urls like http://localhost/test.php?a=testname, since here we are using scripting language it is easy to post a query string to the next page. But is it possible to have a file named as something.html and can I post the query string to this html file?

I am looking or a result like : http://localhost/something.html?a=testname

If any kind of solutions then highly appriciated.

Thanks,
Chittaranjan :)
May 7 '07 #1
4 2060
drhowarddrfine
7,435 Expert 4TB
Yes. Anytime a form uses GET it will be sent to the server as a query string as you show. The fact that it is sent as .php in your first example is only because it is written in script.

If you are saying you want to keep everything the same except change the .php part to .html, there are settings in your server to make it respond to .html as if it were php.
May 7 '07 #2
Yes. Anytime a form uses GET it will be sent to the server as a query string as you show. The fact that it is sent as .php in your first example is only because it is written in script.

If you are saying you want to keep everything the same except change the .php part to .html, there are settings in your server to make it respond to .html as if it were php.
I was always confused about this also, not to thread hijack but thanks for the response, =)
May 7 '07 #3
pbmods
5,821 Expert 4TB
Basically, you configure your server to treat .html files as PHP scripts, using the same line that you use to set up the .php extension:

Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .php .html
  2.  
May 8 '07 #4
jhardman
3,406 Expert 2GB
This actually slows down your server considerably unless you were never planning to have static html pages.

Your server will open and look for scripts on any page with the extensions you specify rather than send html files without checking.

A partial fix is to allow server-side includes which could be scripted. I don't know what the benchmarkers say, but I was under the impression that that would go moderately faster.

Jared
May 24 '07 #5

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

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
2
by: Newbie | last post by:
Hi, I am using creating a drop down menu populated by a call to a postgresql database. The drop down menu is populated correctly (or appears to be) and then upon selecting an item in the menu it...
7
by: Scott | last post by:
I need help to modify the code below to pass url variables from a framset. The click to run this will be in the mainFrame. This script works well in a non-frame page. Grabs the current url...
10
by: Joseph S. | last post by:
Hi, How do I pass a string from one call to a php block to another call in the same page but from another form? Here's my full php code: I'm using two forms in the same page. A hidden field...
7
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
2
by: Bob Sanderson | last post by:
I have a search form from which I hope to be able to select a record by field JobNumber and display it with an output form titled test.php <html> <head> <title>Job Database Search</title>...
4
by: B Squared | last post by:
I'm trying to pass a filename (which is a jpeg image) to a php function / file so that it will display. I know that its simple to get PHP to display an image hardcoding in the filename. For...
3
by: James Robertson | last post by:
I am new to the ASP and VB thing so be kind. Question I have is that I have created an ASPX web site to use as an E-Mail page. But I want to use this for a lot of users. Can I create the link on...
6
by: jej1216 | last post by:
I am trying to put together a PHP search page in which the user can select none, one, two, or three fields to search, and then the results php will build the SQL with dynamic where caluses to reflect...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.