php - Post an HTML Value to IFrame -
how use post function pass fields onto iframe? using target label doesn't seem work. supposed happen when submit fields, posts username , variable forum , logs me in. however, being redirected login page instead. might helpful know iframe in different file field.
<form action="http://www.website.net/login.php" method="post" target="my_iframe"> <label for="username">username</label><input type="text" name="username" required> <label for="password">password</label><input type="password" name="password" required> <input type="submit" name="login" value="login" class="loginbtn"/><a href="http://www.website.net/register.php">register</a> </form> <iframe name="my_iframe" src="http://www.website.net/forums/ucp.php?mode=login" frameborder="0" scrolling="auto" width="100%" height=1500px marginwidth="0" marginheight="5" ></iframe>
try that:
<form action="http://www.website.net/login.php" method="post" target="my_iframe"> <label for="username">username</label><input type="text" name="username" required> <label for="password">password</label><input type="password" name="password" required> <input type="submit" name="login" value="login" class="loginbtn"/><a href="http://www.website.net/register.php">register</a> </form> <iframe name="my_iframe" src="http://www.website.net/forums/ucp.php?mode=login" frameborder="0" scrolling="auto" style="width:100%;height:1500px;margin: 5px 0;"></iframe>
you forgot insert "" in height iframe's property.
remember use css html proprerties, deprecated per w3c html5/xhtml 1.0 rules.
Comments
Post a Comment