mrbenrud.com Posted April 28, 2008 Share Posted April 28, 2008 Hello, Does anyone know of a good tutorial on passing form data to another form? I'd like to collect data from one form and pass it into a form field in a second form. Thanks for your help. Todd Link to comment https://forums.phpfreaks.com/topic/103287-php-form/ Share on other sites More sharing options...
Rohan Shenoy Posted April 28, 2008 Share Posted April 28, 2008 On the second page, simple use: <input type="text" name="field_name" value="<?php echo $_POST["field"] ?>"> You want also want to use the stripslashes() function while echoing the data. Link to comment https://forums.phpfreaks.com/topic/103287-php-form/#findComment-528989 Share on other sites More sharing options...
mrbenrud.com Posted April 28, 2008 Author Share Posted April 28, 2008 Thanks, it worked! Link to comment https://forums.phpfreaks.com/topic/103287-php-form/#findComment-529202 Share on other sites More sharing options...
monkeytooth Posted April 28, 2008 Share Posted April 28, 2008 If in the end the data is stored in a database you may want to read up on some material about cleansing your data before inserting to a database.. and security meassure to apply to help prevent database injection.. Google "MySQL Database Injection Prevention" for example.. Link to comment https://forums.phpfreaks.com/topic/103287-php-form/#findComment-529205 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.