Jump to content

click and change but no form


TheFilmGod

Recommended Posts

I have 5 different buttons on the top of every page. I want a user to be able to click on the top on any page and change it to what they want. This isn't a form but is a <ul><li></li></ul> .

 

I was thinking to make it a link that redirects the user to go that page that processes the php, but then I want the php code to redirect them back. So in summary, I want php code to be executed without them being redirected. I know ajax is possible but I don't want to rely solely on javascript...

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/85398-click-and-change-but-no-form/
Share on other sites

sounds to my like you know your options.

 

1) take them to the processing page which will redirect them back to the original (usually fast enough so they don't even know what happened)

I would suggest creating a message so the users know that the process was finished successfully after redirecting you back (if it's not obvious by itself)

 

or

 

2) ajax it, which relies on JS and PHP

 

 

 

=======

My solution would be both, of course :P

 

there's a reason the <noscript> tags exist!

 

If JS can't be used on the users browser, then you set up your page to go to the php and make those sum-bitches who turn off their JS reload the page.

If JS CAN be used, then the AJAX works, and everyone is happy :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.