Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

PHP Expert help please.

PHP Help Help Web Developing Need code Urgent Javascript html php

  • Please log in to reply

#1
TaimoorSiddiqui

TaimoorSiddiqui

    New Member

  • Member
  • Pip
  • 2 posts

Hi!! Everyone..!!! :D

 

 

I need some help please...

 

I want to save html form input data into a text file and after saving file...i've to redirect user to another page...

 

Please help me....

 

Give ne codes in PHP or Javascript....

 

Thankx in Advance... :wub: :cool:


  • 0

Advertisements


#2
newessence

newessence

    Member

  • Member
  • PipPip
  • 17 posts
By far I am not an expert but that's pretty easy!

html:
<form action="path/to/filename.php" method="post">
<input type="text" name="nameyourposteddata" />
(and/or other form inputs/tag names incl types & names)
</form>

php:
$nameyourhandle=fopen("namenewfiletowrite.txt", "w");
fwrite($nameyourhandle, POST["nameyourposteddata"]);
(do the same for each additional tag, with proper post variables, and for strings of proper formatting characters--newlines, etc.)
fclose($namenewfiletowrite);

then close your php with the tag and follow it with the html you want to put to the browser.

Easy?

If you need more thorough help: www.w3schools.com/php/php_forms.asp

Hope this helps.

Edited by newessence, 03 April 2014 - 10:42 PM.

  • 0

#3
TaimoorSiddiqui

TaimoorSiddiqui

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts

By far I am not an expert but that's pretty easy!

html:
<form action="path/to/filename.php" method="post">
<input type="text" name="nameyourposteddata" />
(and/or other form inputs/tag names incl types & names)
</form>

php:
$nameyourhandle=fopen("namenewfiletowrite.txt", "w");
fwrite($nameyourhandle, POST["nameyourposteddata"]);
(do the same for each additional tag, with proper post variables, and for strings of proper formatting characters--newlines, etc.)
fclose($namenewfiletowrite);

then close your php with the tag and follow it with the html you want to put to the browser.

Easy?

If you need more thorough help: www.w3schools.com/php/php_forms.asp

Hope this helps.

thankx a lot bro....i've found that....!!! thankx!!! :wave:


  • 0






Similar Topics


Also tagged with one or more of these keywords: PHP Help, Help, Web Developing, Need code, Urgent, Javascript, html, php

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP