News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to stop forms submitting to SSI.php

Started by Alanar, June 06, 2015, 04:55:11 PM

Previous topic - Next topic

Alanar

I'm trying to use a form for something separate from SMF, but because I'm using SSI as my website login system, I'm unable to get it to submit to anything else. I'm fairly new to PHP coding and newer to coding for SMF so I've been fiddling with this for a couple of hours. It just submits to the forum index page using "?action=login2" so I'm assuming it's catching anything being submitted and sending it to the login function?

<form action="external_script.php" method="post">
    <fieldset>
        <legend>Login</legend>
        <p>Please enter your code:</p><input type="text" name="access_code" maxlength="8" />
        <br /><br />
        <input type="image"
                   class="submit_button"
                   src="#" />
    </fieldset>
</form>

Kindred

well, yes and no....


the login does not "capture anything..."   
ssi_login is a self contained function, though...  and you can not pass extra data into it.

So -- you can have as many forms as you want on the same page as the login -- and, if the html is properly constructed, they will all work.

From what I see of your code though... you appear to have a form that tries to pass something else into a php file, which would then be used (presumably) by the login form?  If so, that won't work without modification to the ssi_login function....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Alanar

Actually, never mind. I had forgotten to exclude the guest form for users that were logged in. No wonder it was functioning strangely. Thank you for trying to help though. :)

Advertisement: