PHP - Avoid Form Data Resend After Refresh?
When I submitted my Form & refresh then browser resend all data again into database,
So anybody know any solution of this to avoid data resend after refreshing browser.. Similar TutorialsHi, I am newbie to PHP. If any one explain me with a simple example, it would be really great. I have a form page "queue_info.php". After user hits SUBMIT, this page will redirect to an action page "queue_action.php". from form page data are passed using "$quests=$_POST['quests'];" to this action page. Now i need to resend this same data back to the form page "queue_info.php" from action page. How to do this? Appreciate your inputs on this. thanks, prakash I've got a basic form setup on my site that requires the user to fill out the required fields. When one of the fields isn't filled out, the error message for that specific input area is displayed, etc. However, all the information from the form that the user filled out is removed.. I want the user to be able to fill out the form, hit submit, and if any errors, show the specific error but also keep the input boxes populated with the data the user filled out so he/she does not have to re type everything. if(!empty($_POST['submitFeature'])) { // set variables $featurename = mysql_real_escape_string($_POST['featurename']); $name = mysql_real_escape_string($_POST['name']); $email = mysql_real_escape_string($_POST['email']); $email2 = mysql_real_escape_string($_POST['email2']); $age = mysql_real_escape_string($_POST['age']); $city = mysql_real_escape_string($_POST['city']); $state = mysql_real_escape_string($_POST['state']); $src = $_FILES['featureupload']['tmp_name']; $featuresize = $_FILES['featureupload']['size']; $limitsize = 3000000; if(!empty($featurename) && !empty($name) && !empty($email) && !empty($email2) && !empty($city) && !empty($state) && ($email == $email2) && !empty($_FILES['featureupload']['tmp_name']) && ($featuresize < $limitsize)) { // IF ALL IS CORRECT, SUBMIT INFO } else { print ' <ul class="errorlist"> <li class="alert">Please fill out the required fields.</li> '; if (empty($name)) { echo ' <li>* Full Name</li>' . "\n"; $errorname = 'TRUE'; } if (empty($email)) { echo ' <li>* Email</li>' . "\n"; $erroremail = 'TRUE'; } print ' </ul> '; } // 1 - B. END REQUIRED FIELDS ERROR CODES } ?> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data"> <div style="float: left;"> <span class="copy-answer">Your Information</span> <div class="formSec"><label for="name" class="required">Full Name: <?php if(isset($errorname)){echo '<span class="error">*<span>';}?></label> <input type="text" name="name" id="name" value="" maxlength="25" /></div> <div class="formSec"><label for="email" class="required">Email: <?php if(isset($erroremail)){echo '<span class="error">*<span>';}?></label> <input type="text" name="email" id="email" value="" /></div> <input class="submit" type="submit" name="submitFeature" value="Submit Your Feature" /> </form> Hello, guys. I'm using the following code to send me an automated mail in case the user find a broken link. But there are 2 problems: 1) after submitting I'd rather not disrupt their game by refreshing the page. So, is there any way to send mail without the post refreshing? 2) if the user hits F5, the page reloads and the code runs again, sending two or more times the same email. How can I avoid duplicated emails caused by manual browser refresh? (the most important solution currently is how to to avoid duplicated entries, in case an ajax solution is too hard to post here.) <form name="fbrlink" action="<?= $_SERVER['PHP_SELF']."?page=ok" ?>" method="post"> <?php echo('<input name="sbrlink" id="B1" type="button" value="broken Link?" style="border:none; background-color:#FFFFFF; font-family:Trebuchet MS; font-size:15px; font-weight:bold; color:#1A4877; cursor:pointer; display:block; text-decoration:underline;" onclick="this.form.submit();"/>'); ?> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['QUERY_STRING'] == 'page=ok') { echo '<script type="text/javascript" >confirm("Click OK to notify us.");</script>'; mail("contact@ctt.net","report broken link","Game notified:MarioBros"); echo '<script type="text/javascript" >document.fbrlink.sbrlink.disabled = true;</script>'; ?> <script type="text/javascript" >document.fbrlink.action='<?php echo $a; ?>'; alert('<?php $_SERVER['QUERY_STRING'];?>'); </script> <?php } else {} }else{ } ?> Ok first of all i have this code at the final of my insert and update code.
if (!mysql_query($sql,$conn)) { die('Error: ' . mysql_error($conn)); } else{ header("Location: finalmsj.php?finalmsj=".$hiwu.""); } mysql_close($conn); } This could be PHP or MySql so putting it in PHP forum for now... I have code below (last code listed) which processes a dynamically created Form which could have anywhere from 0 to 6 fields. So I clean all fields whether they were posted or not and then I update the mySQL table. The problem with this code below is that if, say, $cextra was not posted (i.e. it wasnt on the dynamically created form), then this code would enter a blank into the table for $cextra (i.e. if there was already a value in the table for $cextra, it gets overwritten, which is bad). What is the best way to handle this? I'm thinking i have to break my SQL query into a bunch of if/else statements like this... Code: [Select] $sql = "UPDATE cluesanswers SET "; if (isset($_POST['ctext'])){ echo "ctext='$ctext',"; } else { //do nothing } and so on 5 more times.... That seems horribly hackish/inefficient. Is there a better way? Code: [Select] if (isset($_POST['hidden']) && $_POST['hidden'] == "edit") { $cimage=trim(mysql_prep($_POST['cimage'])); $ctext=trim(mysql_prep($_POST['ctext'])); $cextra=trim(mysql_prep($_POST['cextra'])); $atext=trim(mysql_prep($_POST['atext'])); $aextra=trim(mysql_prep($_POST['aextra'])); $aimage=trim(mysql_prep($_POST['aimage'])); //update the answer edits $sql = "UPDATE cluesanswers SET ctext='$ctext', cextra='$cextra', cimage='$cimage', atext='$atext', aextra='$aextra', aimage='$aimage'"; $result = mysql_query($sql, $connection); if (!$result) { die("Database query failed: " . mysql_error()); } else { } Hello Everyone, I m making an attendance application. I have an issue with following code, Code: [Select] <?php session_start(); require_once("conf.php"); mysql_select_db('site'); $subjects=$_GET['sublen']; $username=$_SESSION['user']; for($i=1;$i<=$subjects;$i++) { $subject=$_GET[',Sub'.$i]; $query="INSERT INTO Subjects(id,Subjects,User,Classs) VALUES($i,'$subject','$username','F.Y.B.Sc')"; $true=mysql_query($query) or die("Cannot Store subjects".mysql_error()); } ?> <html> <head> <link href="../css/style.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../js/jquery.js"></script> </head> <body> <div id="main"> <div id="logo"> KiMi... </div> <div id="header"> <ul> <li><a href="index.html">Home</a></li> <li><a href="php/subjectsTable.php">Create Subjects</a></li> <li><a href="html/form.html">Contact Us</a></li> <li><a href="html/register.php">Register!</a></li> </ul> </div> <div id="nav"> </div> <div id="content"> <?php if($true) { echo "<div id='dynamicDiv'>"; echo "<div> Subjects stored Successfully!</div></br></br>"; $query="SELECT * FROM Subjects Where User='$username'"; $result=mysql_query($query) or die("Cannot Fetch Data"); echo "<table id='table'>"; echo "<tr><td> </td><td>Subjects</td><td>Class</td></tr>"; while($row=mysql_fetch_array($result)) { echo "<tr><td><input type='checkbox' name='box[]'/> </td>"; echo "<td>"; echo $row['Subjects']; echo "</td>"; echo "<td>"; echo $row['Classs']; echo "</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; } ?> </div> <div id="footer"> © Copyright Amit K. Goda 2011-2012 </div> </div> </body> </html> In the above code i m storing data into database which has been passed into $_GET array. The Code is this Quote <?php session_start(); require_once("conf.php"); mysql_select_db('site'); $subjects=$_GET['sublen']; $username=$_SESSION['user']; for($i=1;$i<=$subjects;$i++) { $subject=$_GET[',Sub'.$i]; $query="INSERT INTO Subjects(id,Subjects,User,Classs) VALUES($i,'$subject','$username','F.Y.B.Sc')"; $true=mysql_query($query) or die("Cannot Store subjects".mysql_error()); } ?> the data is stored but the issue is, since i have data coming in $_GET array when i reload my page the same data is stored again inmy database. So any suggesstions how can i avoid that??? Any Help will be highly appreciated I have a query that gets staff on a particular day then performs a while loop selecting each member that works on that day and the times they work between. I have a for loop in that while loop that lists apointment times for each staff member every 15mins between the times they work, this works fine. I then have in the for loop a while loop that checks for existing appontments in the appointment table and changes the appointment slot for times that are booked to booked. I have found though that the second while loops causes doubling of results when an appointment is found, so I need to work out how to restructure this code so that i dont get the doubling effect of result. you can see the result of the script here http://justrelax.net.au/datetest.php and the code that causes the problem is // convert to US format $input="$month/$day/$year"; // readable date $readDATE="$day/$month/$year"; // convert for mysql date $sqlDATE="$year-$month-$day"; // get day of the week $weekday=date(l, strtotime($input)); echo $weekday."<br/>"; // get working staff from staff table $staffSQL=mysql_query("SELECT * FROM staff WHERE ".$weekday." != 'off' AND onLEAVE='no' AND ACTIVE='yes' ORDER BY staffID ASC"); // return results putenv("TZ=Australia/Adelaide"); while ($staff=mysql_fetch_array($staffSQL)) { $name=$staff['staffNAME']; $avail=$staff[$weekday]; $staffID=$staff['staffID']; list($first, $last)=explode(" ", $name); list($in, $out)=explode("-", $avail); $firstTIME="$sqlDATE $in:00"; $lastTIME="$sqlDATE $out:00"; echo "$first is available between $avail on $weekday<br/>"; $in2=strtotime($firstTIME); $out2=strtotime($lastTIME); $stop=$out2-900; echo $in2." - time start - $firstTIME<br/>"; echo $out2." - time finish - $lastTIME<br/>"; for ($inc=$in2;$inc<=$stop;$inc+=900) { $existSQL=mysql_query("SELECT * FROM appointment WHERE date='$sqlDATE' AND staffID='$staffID'"); if (mysql_num_rows($existSQL)>=1) { while ($appointV=mysql_fetch_array($existSQL)) { $resSTART=$appointV['dateTIME']; $length=$appointV['totalTIME']; $resEND=$resSTART+($length*60); if ($inc>=$resSTART && $inc<=$resEND) { echo "Appointment time is ".date("g.i a", $inc)." <font color='red'><< $first BOOKED</font><br/>"; } else if ($inc<$resSTART || $inc>$resEND) { echo "Appointment time is ".date("g.i a", $inc)." <font color='green'><< $first AVAILABLE</font><br/>"; } } } if (mysql_num_rows($existSQL)==0) { echo "Appointment time is ".date("g.i a", $inc)." <font color='green'><< $first AVAILABLE</font><br/>"; } } } could really use some help on this I have been trying different things for a few days now. The Script:
<h1>Do Add a Message to the MySQL Database</h1> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <textarea name="message"></textarea> <br/> <input type="submit" name="submit"/> </form> <?php // The Connection to the Database // Taken Out ?> <?php // To insert the text data into the MySQL database. if(isset($_POST['submit'])){ $tqs = "INSERT INTO messages (`message`) VALUES ('{$_POST['message']}')"; $tqr = mysqli_query($dbc, $tqs) or die(mysqli_error($dbc)); } ?> <?php // To select the text data from the MySQL database. $tqs = "SELECT * FROM messages"; $tqr = mysqli_query($dbc, $tqs); // To print out the text data inside of table on the page. echo "<h1>This Is Where the Messages Gets Printed on Screen</h1>"; echo "<table><tr><td>ID</td><td>The Message</td></tr>"; while($row = mysqli_fetch_assoc($tqr)){ echo "<tr><td>" . $row['id'] . "</td><td>" . $row['message'] . "</td></tr>"; } echo "</table>"; ?>1. When I have added text with the form to the MySQL database... 2. ... and I have clicked on "page reload" in Firefox to reload the page... 3. ... then the before submitted text gets submitted again to the MySQL database. So basically, add text with the form to the MySQL database, reload the page in Firefox, and the before added text will get submitted to the MySQL database again. My Question Is: What is the proper way to avoid this? Edited by glassfish, 06 October 2014 - 10:18 AM. making it not say resend after sending something + refreshing the page Hi. I am trying to get a PHP Query to refresh every 10 seconds. I have scoured the internet for days and could not find anything of much use. Plenty of Ajax going on (whatever that is) but the scripts were immense. I only want to refresh 7 lines of PHP Query Code. Can you please tell me if this is possible? Thanks in Advance. I have a form on our website that a user can fill out for custom product. I want the form data to be 1) stored into a mysql database AND after storing said data, 2) email the same data to our sales department. 1) The form data DOES get stored into mysql database (except for the first two fields, for some weird reason) 2) I added a "mail" section to the php file that stores the data into the database, but it is not working correctly. I have stripped the email portion down to sending just one of the fields in the "message" to make it easier for troubleshooting I have included here, both the form section of the html file, and the formdata.php file that processes the data for your analysis. I am relatively new to php so there are going to be some issues with security, but I can work on those after I get the store & email process to work correctly. Please review my code and see if anyone can be of assistance. I looked through the forums and couldn't find another issue that was the same as mine. If I just overlooked, please tell me the thread post #. Thanks THE FORM WHICH COLLECTS THE DATA ******************************* <form method=POST action=formdata.php> <table width="640" border=0 align="center"> <tr> <td align=right><b>First Name</b></td> <td><input type=text name=FName size=25></td> <td><div align="right"><b>Telephone</b></div></td> <td><input type=text name=Tel size=25></td> </tr> <tr> <td align=right><b>Last Name</b></td> <td><input type=text name=LName size=25></td> <td><div align="right"><b>Fax</b></div></td> <td><input type=text name=Fax size=25></td> </tr> <tr> <td align=right><b>Title</b></td> <td><input type=text name=Title size=25></td> <td><div align="right"><b>Email</b></div></td> <td><input type=text name=Email size=50></td> </tr> <tr> <td align=right><b>Company</b></td> <td><input type=text name=Comp size=25></td> <td> </td> <td> </td> </tr> <tr> <td align=right><b>Address</b></td> <td><input type=text name=Addr size=25></td> <td><div align="right"><b>Estimated Annual Volume</b></div></td> <td><input type=text name=EAV size=25></td> </tr> <tr> <td align=right><b>City</b></td> <td><input type=text name=City size=25></td> <td> </td> <td> </td> </tr> <tr> <td align=right><b>State/Province</b></td> <td><input type=text name=SProv size=25></td> <td><div align="right"><b>Application</b></div></td> <td><input type=text name=Appl size=25></td> </tr> <tr> <td align=right><b>Country</b></td> <td><input type=text name=Ctry size=25></td> <td><div align="right"><b>Type of System</b></div></td> <td><input type=text name=Syst size=25></td> </tr> <tr> <td align=right><b>Zip/Postal Code</b></td> <td><input type=text name=ZPC size=25></td> <td> </td> <td> </td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right> </td> <td><div align="right"><strong><font color="#FFFF00" face="Arial, Helvetica, sans-serif">COIL DESIGN</font></strong></div></td> <td><font color="#FFFF00" face="Arial, Helvetica, sans-serif"><strong>PARAMETERS</strong></font></td> <td> </td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right><b>Primary Resistance (ohms)</b></td> <td><input type=text name=Pres size=25></td> <td><div align="right"><b>Primary Inductance (mH)</b></div></td> <td><input type=text name=Pind size=25></td> </tr> <tr> <td align=right><b>Secondary Resistance (ohms)</b></td> <td><input type=text name=Sres size=25></td> <td><div align="right"><b>Secondary Inductance (H)</b></div></td> <td><input type=text name=Sind size=25></td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right><b>Peak Operating Current (Amps)</b></td> <td><input type=text name=POC size=25></td> <td> </td> <td> </td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right><b>Output Energy (mJ)</b></td> <td><input type=text name=Egy size=25></td> <td><div align="right"><b>Output Voltage (kV)</b></div></td> <td><input type=text name=Volt size=25></td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right><b># HV Towers per Coil</b></td> <td><input type=text name=TPC size=25></td> <td><div align="right"><b># of Coils per Package</b></div></td> <td><input type=text name=CPP size=25></td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td align=right> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <th colspan=4><b>Please enter any additional information he </b></th> </tr> <tr> <th colspan=4><textarea name=Mess cols=50 rows=10 id="Message"></textarea></th> </tr> </table> </dl> <div align="center"> <p> <input type=hidden name=BodyTag value="<body bgcolor="#484589" text="#FFFFFF" link="#FFFF00" alink="#FFFFFF" vlink="#FF7F00">"> <input type=hidden name=FA value=SendMail> </p> <p><font color="#FFFF00" face="Arial, Helvetica, sans-serif"><strong>PLEASE MAKE SURE ALL INFORMATION<br> IS CORRECT BEFORE SUBMITTING</strong></font></p> <p> <input type=submit value="Submit Form"> </p> </div> </form> THE FILE THAT PROCESSES THE FORM DATA (formdata.php) *********************************************** <?php $con = mysql_connect("localhost","XXX","XXX"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("customform", $con); $sql="INSERT INTO formdata (Fname, Lname, Title, Comp, Addr, City, SProv, Ctry, ZPC, Tel, Fax, Email, EAV, Appl, Syst, Pres, Pind, Sres, Sind, POC, Egy, Volt, TPC, CPP, Mess) VALUES ('$_POST[Fname]','$_POST[Lname]','$_POST[Title]','$_POST[Comp]','$_POST[Addr]','$_POST[City]','$_POST[SProv]','$_POST[Ctry]','$_POST[ZPC]','$_POST[Tel]','$_POST[Fax]','$_POST[Email]','$_POST[EAV]','$_POST[Appl]','$_POST[Syst]','$_POST[Pres]','$_POST[Pind]','$_POST[Sres]','$_POST[Sind]','$_POST[POC]','$_POST[Egy]','$_POST[Volt]','$_POST[TPC]','$_POST[CPP]','$_POST[Mess]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Your Information Was Successfully Posted"; mysql_close($con); $to = "recipient email address here"; $subject = "Custom Form"; $email = $_POST['Email'] ; $message = $_POST['Comp'] ; $headers = "From: $Email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> hi all i am having a big problem that i have been trying to find out what is going on for weeks. i have a echo script that echos data that is in my database, and if i have to refresh the page it will add blank data in my database and the top echo info is blank as well. how can i fix this, and i was wanting to know how do i echo out my info in a textarea. i added a jepg to show you what i mean. here is my code echoforms.php <?php error_reporting(0); require_once('demo.php'); /*Open the connection to our database use the info from the config file.*/ $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); $sql = "SELECT company_name, contact_name, address, street_number, postcode, contact_number, contact_email, budget, description FROM 3dartactforms"; $results = mysql_query($sql); if (!$results) { die('Invalid query: ' . mysql_error()); } while($result = mysql_fetch_array( $results )){ echo '<div style="border: 1px solid #e4e4e4; padding: 15px; margin-bottom: 10px;">'; echo date("d/m/y"); echo '<p>Company Name: ' . $_POST['company_name'] . '</p>'; echo '<p>Contact Name: ' . $_POST['contact_name'] . '</p>'; echo '<p>Address: ' . $_POST['address'] . '</p>'; echo '<p>Street Number: ' . $_POST['street_number'] . '</p>'; echo '<p>Postcode: ' . $_POST['postcode'] . '</p>'; echo '<p>Contact Number: ' . $_POST['contact_number'] . '</p>'; echo '<p>Contact Email: ' . $_POST['contact_email'] . '</p>'; echo '<p>Budget: ' . $_POST['budget'] . '</p>'; echo '<p>Description: ' . $_POST['description'] . '</p>'; echo '</div>'; } ?> I have a script that will export data to excel. After the export, I need the page to reload showing status information, but it does not reload. What could be causing an issue like this? I think that because the export forced the download file dialogue to open, those headers may be preventing the form from reloading properly, but how, why, and what can be done to resolve the issue? I have a form which submits to register.php How can I make it so that when the user gets sent to register.php, and then for some reason they refresh it on register.php, the form doesn't get resubmitted and data isn't added to the database? Hey, I have a Chat system which consists of a main page with 3 iframes situated within it: iFrame 1 = the list of people in the Chat iFrame 2 = the chat log, displaying the messages entered into the Chat iFrame 3 = the form into which you enter your message and then click Submit so that your message is entered into the Chat log Basically what I want is that, when you submit a message via iFrame 3, it refreshes iFrame 2, so you enter in a message and can then see the refreshed version of the chat log and therefore see your new message. The problem is that I'm not sure how to get it so that submitting the form refreshes the iframe. Nor am I 100% sure whether you can refresh one iFrame from within another iFrame. One solution to the second problem is to put the submission form (currently in iFrame 3) onto my main chat page which at the moment just contains the 3 iframes, but even then I don't know how to make submitting the form refresh the chat log! Any help/advice would be appreciated Thanks! Hi All, Is there any way that PHP can detect if a page has been refreshed? Basically I have a form that when submitted, inserts a row in to a database, but I am finding that when I refresh the page, it repeats the insert statement. Any ideas? Thanks Matt Am new here - looks like a great foru! I would sincerely appreciate any help anyone can give me. I have been trying to solve my problem for hours and I am not having any luck, so I thought I would post and see if anyone can help. I am very stuck and am not making much progress on this project, and I am certain the answer is very simple. I am constructing a form to collect data for a specialized purpose. The form and program actually work for its intended function, but I am trying to enhance the user experience by preventing customers from having to reenter all of their data should there be a problem with any of the data submitted. I have been able to do that with the contact form portion, but what I am having trouble with is the portion which has as many as 400 possible entries. So, in a nutshell, if the customers contact data is incomplete or in error, the form will ask them to return to the page and correct things. The previous data entered has been saved in the session and the input value will equal the previous entry. i.e. <tr> <td align="right" class="infoBox"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> <td align=left><?php echo "<input type=text name='cemail' value=\"$cemail\" size=35 maxlength=35>" ?></td> </tr> Works perfectly, all well and good there. On the other 400 more or less entries, I am having a difficult time tweaking the string concatenation to work to achieve similar results. There are 4 columns each with $points entries asking for a dimension in either feet or inches. The <input name=> is one of ptaf,ptai,ptbf,ptbi, appended programatically with the corresponding row number or data point. i.e. "ptaf1", "ptai1", etc... This is produced by the example below and works perfectly also. <?php { $points=100; $i=1; while ($i <= $points) {echo ' <tr><td align="center" width="6"><b> ' .$i . '</b></td> <td align="right" NOWRAP>A' .$i . ' (ft) <input type="text" name="ptaf'.$i.'" size=4 maxlength=3> </td> <td align="right" NOWRAP>A' .$i . ' (in) <input type="text" name="ptai'.$i.'" size=4 maxlength=4> </td> <td align="right" NOWRAP>B' .$i . ' (ft) <input type="text" name="ptbf'.$i.'" size=4 maxlength=3> </td> <td align="right" NOWRAP>B' .$i . ' (in) <input type="text" name="ptbi'.$i.'" size=4 maxlength=4> </td> '; $i++; } } ?> I am trying to add <input value=$ptai.$i> for each field but as I mentioned I am not having any luck. It seems as if I have tried every combination imagineable, but still no luck. My head is spinning! The closest I seem to have gotten was with this: <td align="right" NOWRAP>A' .$i . ' (ft) <input type="text" size=6 maxlength=3 name="ptaf'.$i.'" value="' . "$ptaf" . $i . '" ></td> But line 17 for example returns this: <input type="text" value="17" name="ptaf17" maxlength="3" size="6"> To recap, I am trying to have the value set to whatever the customer may have entered previously. Again, I would most appreciate any help anyone can give me. If you need clarification on anything please let me know. Thanks AJ Say there is a complex opt in process where people start to enter their data but certain questions stop them where they close out of the page. They already entered their data and I feel there is a way to grab it and post it to mysql even though they do not click submit.
How would this be done?
A super simple example (proof of concept) or a link to a tutorial would be very useful.
Edited by brentman, 23 September 2014 - 10:42 AM. Here is video and there is shown how specific this problem is http://faksx.sytes.net/help/ Solutions Witch doesn't fit in for this time is meta refresh,header(),exit(),die() . |