Jump to content

Using php variable in html for that is echoed by php.


fredted40x

Recommended Posts

Hi i have this form

 

echo ('<form method="POST" action="$page">
            Username: <input type="text" name="username">
            Password: <input type="password" name="password">
            <input type="submit" name="submit" value="Login">
            </form>');

And i would like the action of the form to be whatever is in $page. Is it possible, and how would i go about doing it?

 

Thanks

 

echo ('<form method="POST" action="'.$page.'">
            Username: <input type="text" name="username">
            Password: <input type="password" name="password">
            <input type="submit" name="submit" value="Login">
            </form>');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.