Posted 10 June 2006 - 03:11 PM
I have a php form that passes its variables on to another php form that load the information into a MySQL database. Once completed with this operation, the user is returned to the original form.
I would like to be able to insert data from the prior entry back into the form for multiple entries.
How can I do this??
Exp: Textfields entered by client (Input.php) sent as variables (to AddInputMySQL.php) to be added to DB. I would like some of these variables sent back to Input.php to be reused for continuing 'dataentry'.
Input.php ---> AddInputMySQL.php <connection to MySQL, variables entered into DB>
<--------------------------< <-(specific variables from AddInputMySQL.php returned to Input.php)
ANY and ALL help would be greatly appreciated!!
Posted 10 June 2006 - 04:14 PM
<input type="text" name="field_name" <? if (isset ($_POST['php_form'])) echo "value=\"".$_POST['field_name']."\""; ?> />
Posted 12 June 2006 - 09:55 AM
just have the input functions at the top of the page and add
<input type="text" name="field_name" <? if (isset ($_POST['php_form'])) echo "value=\"".$_POST['field_name']."\""; ?> />[/quote]
Thanks for your quick reply. A couple of questions I have:
1. Which form do I need to put this in?
2. You have written 'php_form' - which form would this be?
Thanks for your help,
Posted 12 June 2006 - 02:47 PM
<?php session_start(); ?> <form method='post' action='AddInputMySQL.php'> blah: <input type='text' name='blah' value="<?= $_SESSION['blah'] ?>"> <input type='submit' value ='submit'> </form>
<?php session_start(); $blah = $_POST['blah']; //update database script etc... $_SESSION['blah'] = $blah; header("Location: Input.php"); exit(); ?>
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users