I have some doubts in form submission.
The function that i need is adding a prompt dialog box to confirm befor the user submits the form.
Eg: The user is entering some data in the form and he clicks submit..a dialog box appears and says " Are you sure you want to submit the form"
If "yes" the form is submitted, else "no" it goes back to the page where he was befor the prompt dialog box appear..

How can this be implemented in php, html..? or is there anything can do with javascript also...

Thanks for your effort..

Tryphy..

yes there is a way, but its easier with javascript
the key is the "return confirm"

<form action="something.php" onSubmit="return confirm('Are you sure?');" method="post">
// Fields
// Fields
<input type="submit" name="Submit" class="button" value="Submit">
</form>

I hope this helps

yes there is a way, but its easier with javascript
the key is the "return confirm"

<form action="something.php" onSubmit="return confirm('Are you sure?');" method="post">
// Fields
// Fields
<input type="submit" name="Submit" class="button" value="Submit">
</form>

I hope this helps

Hey thanks,

Yah i used Javascript to solve it..
:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.