LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 520 users online 225361 members 124 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
angeebug13
i love uhmm PUS E LIQUOR? hahah that sounds wronge. L...
Mood: Flirty
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
4 online / 25 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Adding Reply
Archived Topic: It will not be bumped to the top of the forum.
Topic Simple PHP question
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
Mediocre Posted at 12:25 pm on June 7, 2008
one.htm has a form

Code:

<form action="two.php" method="post"
enctype="multipart/form-data">
<label for="file"></label>

File:<input type="file" name="file" id="file" />  

User: <input type="text" name="user" id="user" />  

<br />

<input type="submit" name="submit" value="Submit" />
</form>


I copied this from w3schools and added the "User" input. It's part of an upload script.

two.php uploads the file, and will (say) echo the content of the "user" input. The problem is that I don't know how to do that. What is the variable name for the content of the text input?

Replies
Tony327 Posted at 1:24 pm on June 7, 2008
You're welcome. I'm glad I could help!
Mediocre Posted at 1:08 pm on June 7, 2008
That worked, thanks.
Tony327 Posted at 12:43 pm on June 7, 2008
Maybe this could be what you need?

<?php echo $_POST["user"]; ?>

Once the form is submitted using the post method (as your form is set to do), PHP can retrieve the form data. Check out http://www.w3schools.com/php/php_post.asp for more information... I hope I'm helpful.

All 3 previous replies displayed.