phptim25 Posted February 28, 2011 Share Posted February 28, 2011 Hi, Im very very new to PHP and SQL, which im using for a college project to have an assett tracking database for test equipment. So far has been so good up until now. The problem Ive been having is that I want to add new testers and have come unstuck. This is the main part of the code on the form page: <?php foreach($labels as $field => $label) { echo "<div class='field'> <label for='$field'>$label</label> <input type='text' name='$field' id='$field' size='40' maxlength='65' value='".@$$field."' /></div>\n"; } ?> <div id="submit" align="center"> <input type='hidden' name='RochTest' value='RochTest'/> <input type='submit' value='Submit Details' /> <input type='submit' name='newbutton' value='Cancel' /> </div> </form></body></html> There is a little more to the code although its only creating the array and organising the form layout. Want I want to know is how I can use the submitted to put into my sql database? Your help would be very much appreciated :-) Link to comment https://forums.phpfreaks.com/topic/229131-multiple-field-form-to-add-new-info-into-sql-database/ Share on other sites More sharing options...
fenway Posted March 1, 2011 Share Posted March 1, 2011 You mean how you use PHP to write to a database? Link to comment https://forums.phpfreaks.com/topic/229131-multiple-field-form-to-add-new-info-into-sql-database/#findComment-1181069 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.