ryanmetzler3 Posted September 6, 2013 Share Posted September 6, 2013 (edited) I have the following html form: $form = "<div id='forms'><form action='login.php' method='post'> <table class='forms'> <td>Username:</td> <td><input type='text' name='user'/></td> </tr> <tr> <td>Password:</td> <td><input type='password' name='password'/></td> </tr> <td></td> <td><input type='submit' name='loginbtn' value='Login'/></td> </tr> <tr> <td><a href='register.php'>Register</a></td> <td><a href='forgotpass.php'>Forgot Password?</a></td> </tr> </table> </form> </div>"; It is inside an if/else statement. And you notice I have it set to the php variable "form". The whole form floats left on my webpage. I want to put a small text ad to the right of it, but not on a new line. I have the JS ad saved to a file called smallad.php. So I was going to include "smallad.php"; inside a <td></td> tag in one of the rows of the form. But that does not work. Any ideas? Edited September 6, 2013 by ryanmetzler3 Quote Link to comment https://forums.phpfreaks.com/topic/281934-include-in-html-form/ Share on other sites More sharing options...
denno020 Posted September 7, 2013 Share Posted September 7, 2013 You will need to float the ad and the form so that they can appear on the same line together. Alternatively you could position them using relative/absolute positioning. Denno Quote Link to comment https://forums.phpfreaks.com/topic/281934-include-in-html-form/#findComment-1448577 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.