TokyoJohn Posted October 23, 2008 Share Posted October 23, 2008 This is a layout issue in a PHP file. I created a 'Contact Us' page using <?PHP....?> with address/ph/fax etc...info along with a simple form. On the same page, I added a Google Map using <table>, which sits outside the <?PHP ...?> tags. No problems so far...everything works...BUT...the way I did it, puts the Google map on top of the 'Contact Us' section and I want to put it to be BELOW it. As you can see I'm learning PHP and <DIV> tags. Very simply how do I write it so on the page the map displays below the 'Contact Us' details? Could someone have a look at my code below and offer some help? Thank you. (ps...I deleted some of the map link code for privacy reasons) ********************* <?php $CONTACT_INFO = ' <!-- BELOW TABLE IS DATA TO LEFT OF CONTACT FORM --> <table width="260"> <tr><td colspan=2><h3>COMPANY NAME HERE.</h3></td></tr> <tr height=5><td></td></tr> <tr valign="top"><td>Tel:</td><td>+1-111-111-1111</td></tr> <tr valign="top"><td>Fax:</td><td>+1-111-111-1112</td></tr> <tr height=15><td></td></tr> <tr valign="top"><td>Address:</td><td>123123 West Palm <br>Florida </td></tr> <tr height=15><td></td></tr> <tr><td valign="top">Access:</td><td>Rt. 66 Exit 12 Turn Right <br>Space #5: 5 min.</td></tr> <tr><td></td><td>Center Crest Station Exit #2: 8 min.</td></tr> </table> '; $CONTACT_YOUR_NAME = 'Your Name'; $CONTACT_YOUR_EMAIL = 'Your Email'; $CONTACT_YOUR_TEL = 'Your Tel'; $CONTACT_SUBJECT = 'Subject'; $CONTACT_MSG_COMMENTS = 'Message / Comments'; ?> <!-- GOOGLE MAP. SITS ABOVE THE WHOLE CONTACT US FORM --> <table> <tr colspan="3"> <td><iframe width="500" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%E6%96&sll=37.0625,-95.677068&sspn=46.495626,60.029297&ie=UTF8&s=AARTsJoZ_R7AEcUG-YAJd_h5ZO_AD7dWUg&ll=35.670964,139.72764&spn=0.017432,0.027895&z=14&iwloc=addr&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%E6%9D%B1%E4%BA&ie=UTF8&ll=35.670964,139.72764&spn=0.032,0.027895&z=14&iwloc=addr&source=embed"target="_blank" style="color:#0000FF;text-align:left">View Larger Map</a></small></td> </tr> </table> ********************* Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/ Share on other sites More sharing options...
n3ightjay Posted October 23, 2008 Share Posted October 23, 2008 This definately is a HTML table layout issue.. try writing the page in pure HTML first then adding in the php .. Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-672497 Share on other sites More sharing options...
TokyoJohn Posted October 23, 2008 Author Share Posted October 23, 2008 Doesn't that require also changing to .htaccess and changing how HTML/PHP are parsed? (that's getting beyond my abilities)...kind of hoping for a simply solution... Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-672600 Share on other sites More sharing options...
dropfaith Posted October 23, 2008 Share Posted October 23, 2008 Works fine http://www.dropfaithproductions.com/test.php when i tested your code the form didnt display then i realized its not echod or printed to the page it seems but yeah its your php thats messing with it all make sure the code echos out cause this code below works fine for me now that i removed the php <!-- BELOW TABLE IS DATA TO LEFT OF CONTACT FORM --> <table width="260"> <tr><td colspan=2><h3>COMPANY NAME HERE.</h3></td></tr> <tr height=5><td></td></tr> <tr valign="top"><td>Tel:</td><td>+1-111-111-1111</td></tr> <tr valign="top"><td>Fax:</td><td>+1-111-111-1112</td></tr> <tr height=15><td></td></tr> <tr valign="top"><td>Address:</td><td>123123 West Palm <br>Florida </td></tr> <tr height=15><td></td></tr> <tr><td valign="top">Access:</td><td>Rt. 66 Exit 12 Turn Right <br>Space #5: 5 min.</td></tr> <tr><td></td><td>Center Crest Station Exit #2: 8 min.</td></tr> </table> <!-- GOOGLE MAP. SITS ABOVE THE WHOLE CONTACT US FORM --> <table> <tr colspan="3"> <td><iframe width="500" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%E6%96&sll=37.0625,-95.677068&sspn=46.495626,60.029297&ie=UTF8&s=AARTsJoZ_R7AEcUG-YAJd_h5ZO_AD7dWUg&ll=35.670964,139.72764&spn=0.017432,0.027895&z=14&iwloc=addr&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%E6%9D%B1%E4%BA&ie=UTF8&ll=35.670964,139.72764&spn=0.032,0.027895&z=14&iwloc=addr&source=embed"target="_blank" style="color:#0000FF;text-align:left">View Larger Map</a></small></td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-672613 Share on other sites More sharing options...
haku Posted October 24, 2008 Share Posted October 24, 2008 Doesn't that require also changing to .htaccess and changing how HTML/PHP are parsed? You can intermittently mix php and html as much as you want (with the exception of headers). Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-673493 Share on other sites More sharing options...
TokyoJohn Posted October 27, 2008 Author Share Posted October 27, 2008 dropfaith, Thanks and I can see it works on your test.php but 1 small issue...removing the <php> means the 'Contact Us' page would no longer have the 'Contact Us' form... $CONTACT_YOUR_NAME = 'Your Name'; $CONTACT_YOUR_EMAIL = 'Your Email'; $CONTACT_YOUR_TEL = 'Your Tel'; $CONTACT_SUBJECT = 'Subject'; $CONTACT_MSG_COMMENTS = 'Message / Comments'; The form is the key component to the page...so kind a' need that. Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-675268 Share on other sites More sharing options...
dropfaith Posted October 27, 2008 Share Posted October 27, 2008 where is the contact form supposed to sit?? your code doesnt state really where the form goes Quote Link to comment https://forums.phpfreaks.com/topic/129695-moving-google-map-to-below-contact-us-form-layout-issue/#findComment-675344 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.