/    Sign up×
Community /Pin to ProfileBookmark

Creating online form and then viewing the results…?

I wanted to do an online form that when the user fills the textfields after he hits submit it would take him to a page to see what he wrote…(pretty much the same layout too), how can this be done in php?

Also

p.s. Is there a way to make a online form and after submit it converts it to Word?

Thnx

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@sneakyimpFeb 26.2009 — If you have this form:
[code=html]
<form action="handler.php" method="post">
<input type="text" name="myInput">
<input type="submit" name="submit" value="submit">
</form>
[/code]


Then it will submit via POST to a file called 'handler.php'. This handler.php file will show you what was displayed:
[code=php]
if (!isset($_POST['submit'])) {
die("You didn't submit anything!");
} else {
echo "You submitted the following:<br>";
echo $_POST['myInput'];
}
[/code]


If you want to create a word document out of that, you are going to need to get a lot more involved in your coding skills.
Copy linkTweet thisAlerts:
@zahidrafFeb 27.2009 — I think you can use to create doc file aand save them on server using php.

tech news
Copy linkTweet thisAlerts:
@riskmodauthorFeb 27.2009 — thanks guys yeah still researching on how to conver php form to word doc
×

Success!

Help @riskmod spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...