Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening a new page in php on a button press

I want a new page to be opened when a button is pressed. Here is my code so far:

<input name="newThread" type="button" value="New Discussion" onclick="window.open('Political/Thread/thread_insert.php')"/>

It fails, however, ..I think the path is incorrect, but I dont know why..cause it is the correct directory path...

like image 678
Matrix001 Avatar asked Dec 01 '22 01:12

Matrix001


1 Answers

This will open a new tab/window (depending on the user's settings):

<a class="button" href="Political/Thread/thread_insert.php" target="_blank">New Discussion</a>

To make this "a button":

a.button {
    border: 1px solid #808080;
    background: #a0a0a0;
    display: inline-block;
    padding: 5px;
}
like image 93
Eric Avatar answered Dec 03 '22 16:12

Eric