fredted40x Posted April 30, 2010 Share Posted April 30, 2010 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 Link to comment https://forums.phpfreaks.com/topic/200260-using-php-variable-in-html-for-that-is-echoed-by-php/ Share on other sites More sharing options...
cags Posted April 30, 2010 Share Posted April 30, 2010 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>'); Link to comment https://forums.phpfreaks.com/topic/200260-using-php-variable-in-html-for-that-is-echoed-by-php/#findComment-1050937 Share on other sites More sharing options...
fredted40x Posted May 3, 2010 Author Share Posted May 3, 2010 Thank you! Link to comment https://forums.phpfreaks.com/topic/200260-using-php-variable-in-html-for-that-is-echoed-by-php/#findComment-1052271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.