• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP script that takes text input from a form, edits it, and generates webpage?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I'm trying to create a PHP script that takes this input from a form:

1533 Fairway Green

Full featured tour link: http://vt.realbiz360.com/Listing-328101.html

MLS/IDX compliant version of your tour: http://vt.realbiz360.com/MLS-328102.html

and after submission outputs on the screen this:


and at the same time create a file with the following code and name and create it automatically on my server in the following directory:

http://www.victorlinphoto.com/vt/1533FairwayGreen.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>1533 Fairway Green</title>
</head>

<body>
<div align="center">
<iframe src ="http://vt.realbiz360.com/Listing-328101.html" scrolling="no" width="1000px" height="675px">
<p>Your browser does not support iframes.</p>
</iframe>
<img src="VT-logo.jpg" width="1000" border="0" usemap="#Map"/>
<map name="Map" id="Map">
<area shape="rect" coords="337,1,619,189" href="http://onetwosixdesign.com/" target="_blank" alt="OneTwoSixDesign Staging" />
<area shape="rect" coords="639,0,948,189" href="http://www.victorlinphoto.com/realestate/index.php" target="_blank" alt="Victor Lin Photography" />
</map>
</div>
</body>
</html>

I know that I have to create a form for inputting the information in the first quote, but I'm at a loss as to what to do afterwards.

EDIT:

If I paste

1533 Fairway Green

Full featured tour link: http://vt.realbiz360.com/Listing-328101.html

MLS/IDX compliant version of your tour: http://vt.realbiz360.com/MLS-328102.html

into my textarea form and use a PHP script to re-display the input, it redisplays it all in one line! The formatting is gone... WTF?
 
Last edited:
into my textarea form and use a PHP script to re-display the input, it redisplays it all in one line! The formatting is gone... WTF?

I assume you're viewing the output in a web browser, which will ignore newlines. Look at the source. And if you want things on separate lines, you will need to add the <br> or <p> tags.
 
Back
Top