Answer the question
In order to leave comments, you need to log in
How to make another page open after form submission?
After clicking on the "Send" button, you need to open another page. How to do it? Hang up an onclick with a function on the button. What is the function itself? I'm not strong in js.
PS Probably incorrectly explained. I meant that the data is sent where necessary, and then another page opens.
Answer the question
In order to leave comments, you need to log in
To load the response from the server into the desired window after submitting the form, it has a target attribute .
Moreover, such an opportunity exists not only in the form, but even in the button in the form of the formtarget attribute .
The name of the window is specified as the target window — the name attribute . To open in a new window, specify the standard name _blank . The default value is _self .
In general, the level of questions and answers has become catastrophically low ...
if(isset($_POST['submit'])){
http_redirect('site.url')
}
php.net/manual/ru/function.http-redirect.php
<script language="JavaScript">
$('submit').click(function(){
window.location.href = "my_url"
})
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question