logo
Tags down

shadow

Can't insert new input to my form after putting old info in the form


By : Bashar Reda
Date : October 16 2020, 06:10 PM
To fix this issue The problem is controlled vs uncontrolled inputs.
Since you're setting the value from an initial (I assume?) ajax / web query, it appears your setNewTitle isn't updating jsonFromDataBase.title - or if it is, you'll need to fetch the value again in the onChange handler.
code :


Share : facebook icon twitter icon

How to use INSERT...SELECT to insert data form one table to another based on form input


By : user3470782
Date : March 29 2020, 07:55 AM
hop of those help? I have situation when i want to add data from column formCompany, formPlace in tabel1 based on input from form into table2 column formCompany, formPlace. Something like this: , First off
Fix the SQL injection hole
code :
$formCompany = mysql_real_escape_string($_POST['formCompany']);
$formPlace = mysql_real_escape_string($_POST['formPlace']);
$formOffer = mysql_real_escape_string($_POST['formOffer']);
$sql="INSERT INTO table2  
      (formCompany, formPlace, formOffer) 
      SELECT table1.formCompany, table1.formPlace, '$formOffer' "
        //All insertions happen here ^^^^^^^^^^^^^^^^^^
      ." FROM table1 
        WHERE formCompany LIKE '%$formCompany%' 
          AND formPlace LIKE '%$formPlace%' ";

Copy Info from Sub-Form to Form based on input in two text boxes


By : user2426063
Date : March 29 2020, 07:55 AM
it should still fix some issue Sort the subform's query in descending order.
In your code, use the RecordsetClone property of the subform to reference any field you need in the first row, and apply to the new record.
code :
Dim rs as recordset

Set rs=me!mySubform.form.RecordsetClone: With rs
    If not .EOF then
        PrevReading = !CurrentReading
        (etc)
    End If
.close: End With
Set rs=nothing

putting a new line in form input?


By : Yanzhi Zhang
Date : March 29 2020, 07:55 AM
will be helpful for those in need For adding new lines by pressing Enter you can use HTML