Forum Moderators: open
Im running a rather large PHP/MySQL project in my spare time and i am in need of a little bit of javascript, basically i need to have two buttons for one form that submit the form to seperate locations.
the first is POST and the second is PREVIEW.
The thing is, i CANNOT do this in php using: "$var = $_POST['Action'];" because my project has become so big that im using templates and classes to control things, and long story short, the submit link will conflict with other parts of the project, so i need two links that submit the form differently, as are:
Post = "?nav=news&a=2&i=".$i."&s=1&w=1&for=1
Preview = "?nav=news&a=2&i=".$i."&s=2&w=0&for=0
the reason for this is my project is module based, the forum and new page are all modules, and $for indicates the page will forward if its processing, $w indicates the page will only show the main specified module in $nav so its always assumed that with them two variables in the form we would be processing the data instead of allowing me to preview it...
A little bit of javascript would be the perfect solution, preferably one thats compatible with a majority of browsers..
Thanks in advance, Cyberjunky.