PHP- dynamic form action

hbk

hbk

@hbk-UY6MQq Oct 24, 2024

hi guys.

i want to be able to redirect my form to a page, based on the input provided by the user.

eg. On my form, i ask the user whether he likes ice-creams or chocolates.
Suppose he says ice-creams. I then direct him to a page showing the flavours of ice creams i have. If, instead, he says that he likes chocolates, i direct him to a page showing the chocolate varieties i have.

how can i code this using HTML/PHP.

I know it can be done using javascript, but then, is javascript the only option??

is it not possible usning only HTML/PHP??

please somebody provide the javascript code for the same, in case you feel that javascript is the only option availale.

thanks a ton.
hbk

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform