/    Sign up×
Community /Pin to ProfileBookmark

Posting form to HTTP_REFERER code showing in actual page, how to stop it?

Hi i need to have a form that posts info to the referring page. So i thought it would be easiest to use SSI Command <!–#echo var=”HTTP_REFERER”–> but of course when you put it inside the post attribute you get some of the HTML Code ending up showing on your page then bit after <!–#echo var=”HTTP_REFERER”–>, you see –> onsubmit and stuff.

Any ideas how to stop that?

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@ray326Apr 17.2007 — action="#"
Copy linkTweet thisAlerts:
@danpoultonauthorApr 17.2007 — Obviously i am putting the the page to post to in the action attribute of the form tag.

But when i put the SSI command HTTPREFER inside it i get the end of the SSI command '-->' and the end of the form tag 'more attributes>' spilling out into the content

so i have this

content start

form starts here --> onsubmit="dosomething">

then the rest of my form that doesn't work.

In other words i can see my html code on my page in a normal view in IE or FF.

Anyone know how to stop that?
Copy linkTweet thisAlerts:
@ray326Apr 18.2007 — I'm still not clear exactly what you've got in the form tag but maybe you need to use single quotes, e.g.

<form action='<!--#echo var="HTTP_REFERER"-->' onsubmit="..." ... >

Or maybe it's a limitation of the SSI syntax.
×

Success!

Help @danpoulton spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...