Ilya Medvedev Ilya Medvedev - 1 year ago 72
HTML Question

Changing a variable in php file

How to add values from

in php file?


<input type="text" id="align" name="align"/>

php file


Answer Source

You mean you want to post it and put it in a PHP variable?

Try this:

<form action="somephpfile.php" method="POST">
    <input type="text" name="align" value="center" />
    <input type="submit" value="Send!" />


    $align = $_POST['align'];
    echo $align;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download