Entering HTML into a form.

august471

New Member
How can i enter html code into a form. And then have the code saved as a separate html file once it is submitted.
 

august471

New Member
Thanks for your reply RoboticPro.

Im new to webdesign and ill tyr to expain my problem in more detail.

Yes I am using PHP.
1. what needs to be done to enter HTML into a form.
2. How to have the HTML saved as a separate file.

Google Maps has a feature where they give u HTML to use on your website.

Im getting all address of freinds and family and want to be able to use the maps by just (include)ing it on my website.

I need a faster way to save the code into files.
example.
myaddress.html
momsaddress.html
liitlesistersaddress.html....and so on.

im going to do this about 100 times or more.

just want a faster way to make the files instead of the manual way.

each person has a table in a database.
a have a field with the map name for each person.
that way when i view each persons info the map is (include)ed with thier information.

hope that expains my problem.

Thanks.
 
Last edited:

DHDdirect

New Member
Let me reword your question so to see if I have understood you correctly.

You would like to gather information from family members, that information is then submitted and stored into a database. Then you view pages for each family member in which these pages retrieves the family members information from the database and presents it on the page.

Is that what you are after?

If this is the case and you are using PHP to collect information, then you should be using MySQL for the database.

When retrieving the information from the database you can them put each piece into PHP variables, those variables with then be inserted into your HTML code to display such information, including into google maps code.
 

august471

New Member
YES!! DHDdirect, that is exactly what i was trying to say.

I am using mysql and i have a fair understanding of the basics.

If I am understanding you correctly are you saying that i can store html in my database and then have it actually run as code when i retrieve it?

IF so,can u give me an example on how to do this.
 

DHDdirect

New Member
Your goal wouldn't be to put HTML into the database, although I suppose it is possible, but more along the lines of the specific information you would like to store for each person such as there name, address, phone number etc.

You mentioned that each person has a table in the database. I don't think that would be necessary for what you are trying to do. You can very easily just create one table say "familyMembers" and each row in that table will be associated with each family member. With columns such as

Name | Street | Town | Zip Code | Phone | Etc

So when retrieving that information from the database you only have to search the one table looking for the row with a specific name. That information then gets put into a PHP array, then split into individual php variables which then gets inserted into your PHP code for display.

I could provide you with some examples if you would like but for a deeper understanding it is the best bet to read and learn for yourself.

You can go HERE to learn more about connecting to MySQL, inserting information into the database, updating information, and selecting information. To the left of the link page you will see the PHP Database menu items which goes into further detail.

Keep me posted on how you go and if you have any more questions don't hesitate to ask.
 
Last edited:

august471

New Member
DHDdirect,once again thanks for the reply.

The link that u gave me was like a treasure chest!!

Im now remaking my entire program/script.

But there is still a problem that i have.

Here an example of the script that i get from Google maps.

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=williams+brice+stadium&amp;aq=&amp;sll=34.08732,-80.933232&amp;sspn=0.00917,0.016093&amp;gl=us&amp;ie=UTF8&amp;hq=williams+brice+stadium&amp;t=h&amp;ll=33.972845,-81.018182&amp;spn=0.018507,0.032015&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=williams+brice+stadium&amp;aq=&amp;sll=34.08732,-80.933232&amp;sspn=0.00917,0.016093&amp;gl=us&amp;ie=UTF8&amp;hq=williams+brice+stadium&amp;t=h&amp;ll=33.972845,-81.018182&amp;spn=0.018507,0.032015" style="color:#0000FF;text-align:left">View Larger Map</a></small>

how do i attach this code to each persons information.
the code will be different for each person.
the plan is to have the map show up beside each persons information.
it would be nice if i could copy and paste the code into the table, a field named 'map'. ive tried to but i doesnt work.
any suggestions on how to do this.
 

MarkR

New Member
DHDdirect,once again thanks for the reply.

The link that u gave me was like a treasure chest!!

Im now remaking my entire program/script.

But there is still a problem that i have.

Here an example of the script that i get from Google maps.

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=williams+brice+stadium&amp;aq=&amp;sll=34.08732,-80.933232&amp;sspn=0.00917,0.016093&amp;gl=us&amp;ie=UTF8&amp;hq=williams+brice+stadium&amp;t=h&amp;ll=33.972845,-81.018182&amp;spn=0.018507,0.032015&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=williams+brice+stadium&amp;aq=&amp;sll=34.08732,-80.933232&amp;sspn=0.00917,0.016093&amp;gl=us&amp;ie=UTF8&amp;hq=williams+brice+stadium&amp;t=h&amp;ll=33.972845,-81.018182&amp;spn=0.018507,0.032015" style="color:#0000FF;text-align:left">View Larger Map</a></small>

how do i attach this code to each persons information.
the code will be different for each person.
the plan is to have the map show up beside each persons information.
it would be nice if i could copy and paste the code into the table, a field named 'map'. ive tried to but i doesnt work.
any suggestions on how to do this.

I would make the variable in the embedded query dynamic so you just pass it a zipcode and it'll get the location for you and show it on the map.

Eg have the query in the iframe as:

http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=<PUT YOUR ZIPCODE HERE>&gl=us&ie=UTF8
 

august471

New Member
Thanks for everyone who replied.
HERE is the updated version of my question.

How can i PASTE html code into a form, Store it in a MYSQL database,Retrieve the code in a Query, and Have the code Function as HTML wherever i insert/echo the variable holding the code.
.Inside of a div for instance.
 
Top