--- viewcharts <[EMAIL PROTECTED]> wrote: > I'm new to php and need to populate form values when the form loads up. > It would be like using cookies, but I don't want the data client side. > I want the form to autopopulate the same for everyone. > > Is that possible using php? > > Wes
Yes. You don't mention which type of form inputs you wish to populate. A text input is pretty easy to work with. <?php $x = "Some Default Value"; ?> <input type="text" name="var" value="<?php print $x; ?>"> There are ways to streamline this, of course, but I wanted it to be as clear as possible. Of course, if you want the value to be static, you don't need a PHP variable at all. Working with checkboxes, radio buttons, and select lists is a bit trickier but doable. On the text inputs if you have special characters, especially quotes in your value, you should use htmlentities(stripslashes()) on the value before you display it in the value property of the input tag. Based on your description, this is as much as I can offer. With more detail, perhaps someone will have additional suggestions. James _____ James D. Keeline http://www.Keeline.com http://www.Keeline.com/articles http://Stratemeyer.org http://www.Keeline.com/TSCollection http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc. Fall Semester Begins Sep 7 -- New Classes Start Every Few Weeks. ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
