employment app

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mkyb14
Forum Newbie
Posts: 12
Joined: Sat May 28, 2005 7:46 pm

employment app

Post by mkyb14 »

i'm trying to get the input fields for a employment application that i'm writing to keep the values entered still in the fields. the app is here http://69.166.122.237:8080/confirm_applicant.php . you'll see the inputs are on the left and then when submited places it on the right. i'd like to keep what was entered on the left incase what the user inputed was wrong so that they can update it. then i'll put a save button on the left side so that it saves the information about the user. is this possible? and how?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

You have to do something like this in your code:

Code: Select all

if (isset($_POSTї'submit'])){
 $text_input1 = (!empty($_POSTї'text_input1']))? $_POSTї'text_input1']: '';
 //Repeat for each field

}
Then in your html:

Code: Select all

<input type=&quote;text&quote; name=&quote;text_input1&quote; value=&quote;<?php echo $text_input1; ?>&quote;>
Post Reply