Skip to content
Advertisement

Get input name from different page in different folder

I am just wondering if I can access to my input from different php page in another folder. I just want to pass search (input name) from index/index.php to artucles/index.php.

<div style="width: 500px; margin-right: 300px;">
            <div class="single_input">
                <input style="font-weight: bold;" class="font1" name="search" type="text" 
                 placeholder="Search what you want">
            </div>
 </div>

Advertisement

Answer

Well, you should just use a form.

<form method="post" action="articles/index.php">
    <input name="search" type="text" placeholder="Search what you want">
</form>
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement