what is the asp code represent self

K

Ken Schaefer

<%
For Each Item in Request.ServerVariables

Response.Write(Item & " = " & Request.ServerVariables("Item") & "<br>")

Next
%>

Cheers
Ken

: sorry , i want the code like php_self
:
: "<? echo $_SERVER['PHP_SELF']?>"
:
:
: "Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> ¦b¶l¥ó
: ¤¤¼¶¼g...
: > What?
: > <form action="yourpage.asp">
: >
: > Ray at home
: >
: > : > > used in form action
: > >
: > > thanks
: > >
: > >
: >
: >
:
:
 
R

Ray at

I don't see my post from last night. It seems a few posts didn't make it.
I think my response said something like this:


<form action="<%=request.servervariables("SCRIPT_NAME")%>">

That will return the full path to the script name, so you'd wind up with:
<form action="/subdir/file.asp"> if your asp page is in a subdirectory.
This will work fine though. If you want to pull out just the script name
though, you can make a function as so:

<%

Function ASP_SELF()
sScript = Request.ServerVariables("SCRIPT_NAME")
aParts = Split("/" & sScript, "/")
ASP_SELF = aParts(UBound(aParts))
End Function
%>
<form action="<%=ASP_SELF%>">

Ray at work

hycn office said:
sorry , i want the code like php_self

"<? echo $_SERVER['PHP_SELF']?>"


Ray at said:
What?
<form action="yourpage.asp">

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top