input data

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
jauson
Forum Contributor
Posts: 111
Joined: Wed Oct 05, 2011 12:59 am

input data

Post by jauson »

Hi Anyone!

I made a registration form. fields are ========[name, email, contact, address]=========

fields important and not to be empty is ===[name]===.

when I fill up all the fields except the name script will work and say =========[name should not be empty]==========
and when the page refreshes all the input data i input is left blank again. I dont like to input it again. is there any way to resolve this problem.

many thanks
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: input data

Post by twinedev »

There is a a attribute to you inputs caller value="whatever"[/b. so you could so something like:

Code: Select all

<input name="whatever" value="<?php echo (isset($_POST['whatever'']) ? htmlspecialchars($_POST['whatever'']) : ''); ?>" />
-Greg
Post Reply