greatchap Posted February 11, 2014 Share Posted February 11, 2014 Hello Guys, I am not a php or web developer. I need to do some work in a login php script and I know just enough php to do that. Basically I am in a function where I get some data entered by user. I need to validate that and if there is a problem tell the user what it is. One option is to use javascript and use the alert command to show a message box. I want a slightly better option. Something like showing a dialog box form/box with text and an ok button. Can you guys give me a function which takes 2 inputs like title and text and does the job. for e.g. ShowMessage("Title","How are you?"); // and this does the job. Thank you, Cheers, GR Link to comment Share on other sites More sharing options...
Barand Posted February 11, 2014 Share Posted February 11, 2014 You cannot interact with the user in the middle of a php script so it will have to be javascript. Have you looked at confirm() Link to comment Share on other sites More sharing options...
greatchap Posted February 12, 2014 Author Share Posted February 12, 2014 Alert command for javascript does the work. But rather than displaying a typical message box is it possible to show a better dialog box either using some other tool. Link to comment Share on other sites More sharing options...
trq Posted February 12, 2014 Share Posted February 12, 2014 Yes it possible. Surely you've seen it done. PHP however, is not the solution. Link to comment Share on other sites More sharing options...
Recommended Posts