/    Sign up×
Community /Pin to ProfileBookmark

Is it possible?

Hi,

Is it possible for me to replace <form action=”error.php”> with a veriable like:
<form action=”<?php echo $pagename ?>”>.

you see i would like to redirect the client to one page if he/she gives one answer but to another page if he/she gives another answer.

If the method above wont work what will work.

(I tried the above methor but I dont seem to get it to work. …. keeps redirecting to the same page.)

Pls help!!!

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@gogelpotauthorAug 24.2006 — Sorry for the this but I found my problem.
Copy linkTweet thisAlerts:
@ahk2chanAug 24.2006 — It won't work for what you trying to do because the variable has already been substituted with a value at server-time, which means your users haven't been given any answer yet. So it will always send to 1 page.

What you can do is to create a page where this form is going to submit to. On this page, according to the URL parameter, determine what page to redirect to.
×

Success!

Help @gogelpot 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.17,
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,
)...