Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Draft saved
Draft discarded
Cancel
3
  • you cannot call js functions from php code Commented Mar 19, 2015 at 2:26
  • Like @Lashane said, you can't do what you're doing. Instead, for the first if statement, echo something like "success". Read this with an if/else statement in your page's javascript and that's where you call the pW function. Commented Mar 19, 2015 at 2:28
  • So you know how to call one JavaScript function – alert – correctly "from within PHP", but you are not able to transfer that knowledge to calling another JS function? And btw., you don’t need to use JavaScript for this in the first place – instead you could simply not output the style="display:none;" attribute on the form, by checking whether or not a password was send right there and then in PHP. Commented Mar 19, 2015 at 4:45

default

AltStyle によって変換されたページ (->オリジナル) /