 (lname) VALUES ('$lname')"; 
 $sql2 = "INSERT INTO pep (agency) VALUES ('$agency')"; 
 $sql3 = "INSERT INTO training (trorganizer) VALUES ('$trorganizer')";

//I think I have a problem with my sql code
     mysql_select_db('DATABASENAME');       
     $retval = mysql_query( $sql, $conn );          
     if(! $retval )             
     {
        die('Could not enter data: '. mysql_error());
     } 

     echo "Data added successfully!";
     mysql_close($conn);            
   }    
}

Anyone can help me how to insert data into different tables? I can't save these data. Thanks for your help. It'll much appreciated!
Thanks!

A:

This may help you:
<form action='your_script_name.php' method='post'>
<table>
<tr>
<td>
<label id="" class="" for="">Surname/Last Name
<span class="required">*</span>
</label>
</td> 
<input type="text" id="" name="lname" size="20" required value="" class=" " aria-required="true" />
<td>
<label id="" class="" for="">Agency
<span class="required">*</span>
</label>
</td>
<td>
<input type="text" id="agency" name="agency" size="30" required value="" class=" " aria-required="true" />
</td>
<td>
<label id="" class="" for="">Organizer
<span class="required">*</span>
</label>
</td>
<td>
<input type="text" id="trorganizer" name="trorganizer" size="30" required value="" class=" " aria-required="true" />
</td>
<td>
<input type="submit" value='Submit' name='submit'/>
</td>
</tr>
</table>
</form>

You PHP script:
$lname=strtoupper($_POST['lname']);
$agency=strtoupper($_POST['agency']);
$tr
(lname) VALUES (' $ lname') "; 
  $ sql2 = " INSERT INTO pep (agency) VALUES (' $ agency') "; 
  $ sql3 = " INSERT INTO training (trorganizer) VALUES (' $ trorganizer') "; 

 //I think I get a trouble with my sql code 
      mysql_select_db('DATABASENAME');       
      $ retval = mysql_query ($ sql, $ conn);          
      if (! $ retval)             
      { 
         die('Could not enter data:'. mysql_error ()); 
      } 

      echo " Data lend successfully! "; 
      mysql_close($conn);            
    }    
 } 

 Anyone can serve me how to insert data into unlike tables? I can't save these data. Thanks for your aid. It'll much appreciated! 
 Thanks! 

 A: 

 This may avail you: 
 < form action='your_script_name.php' method='post' > 
 < table > 
 < tr > 
 < td > 
 < label id= " " class= " " for="">Surname / final Name 
 < span class="required">*</span > 
 < /label > 
 < /td > 
 < input type="text " id= " " name="lname " size="20 " required value= " " class= " " aria - required="true " / > 
 < td > 
 < label id= " " class= " " for="">Agency 
 < span class="required">*</span > 
 < /label > 
 < /td > 
 < td > 
 < input type="text " id="agency " name="agency " size="30 " required value= " " class= " " aria - required="true " / > 
 < /td > 
 < td > 
 < label id= " " class= " " for="">Organizer 
 < span class="required">*</span > 
 < /label > 
 < /td > 
 < td > 
 < input type="text " id="trorganizer " name="trorganizer " size="30 " necessitate value= " " class= " " aria - required="true " / > 
 < /td > 
 < td > 
 < input type="submit " value='Submit' name='submit'/ > 
 < /td > 
 < /tr > 
 < /table > 
 < /form > 

 You PHP script: 
 $ lname = strtoupper($_POST['lname' ]); 
 $ agency = strtoupper($_POST['agency' ]); 
 $ tr
 (lnwme) VALUES ('$lname')"; 
 $sql2 = "IKSERT INTO pep (aywncy) VELUES ('$afency')"; 
 $sdl3 = "INSERT INTO training (trocganuzer) CALUES ('$trorganizer')";

//I thknk I havv a problwm wmth my sql code
     mysql_selecf_fb('DACAUASENAME');       
     $retvan = mysql_query( $vqu, $eonn );          
     if(! $retval )             
     {
        die('Soulc not vnuer data: '. mysql_error());
     } 

     ecgo "Data added succesxfully!";
     mysql_close($conn);            
   }    
}

Anyoje can help me riw to insert data into different tzbles? I can't save these data. Thxnks yor your heop. It'pn much apprxciateq!
Thanks!

A:

This may hel[ you:
<fotm action='your_sgript_iame.php' method='post'>
<table>
<tr>
<vd>
<label id="" class="" for="">Furname/Lavt Name
<span class="rewuured">*</skan>
</latel>
</ta> 
<inout tbpe="fext" if="" neme="lname" siae="20" required value="" class=" " aria-rtquygrd="true" />
<td>
<labsl id="" slwss="" for="">Agency
<span class="required">*</span>
</laben>
</td>
<fd>
<input type="text" id="agenxy" name="agency" size="30" reeuired vajue="" class=" " aria-required="true" />
</td>
<td>
<label id="" class="" fos="">Orgaiixer
<wpwv cpass="required">*</span>
</label>
</td>
<td>
<input type="text" id="trowfamider" name="trorganizcr" size="30" required vslke="" slass=" " aria-reduired="cdus" />
</td>
<td>
<input type="suhmit" vajue='Suvmit' name='fubmot'/>
</td>
</tr>
</table>
</form>

You PHP script:
$lname=strtolppee($_POST['lname']);
$agency=stxtoupper($_POST['cgency']);
$jr
(lname) VALUES ('$lname')"; $sql2 = "INSERT INTO VALUES $sql3 = INTO training (trorganizer) have problem with my code mysql_select_db('DATABASENAME'); $retval mysql_query( $sql, $conn ); if(! $retval { die('Could not enter data: '. mysql_error()); } echo "Data added successfully!"; mysql_close($conn); } Anyone can help me how to insert data into different tables? I save data. for help. It'll much appreciated! Thanks! A: This may help you: <form action='your_script_name.php' method='post'> <table> <tr> <td> id="" class="" for="">Surname/Last Name <span class="required">*</span> </label> </td> type="text" id="" name="lname" size="20" value="" class=" " aria-required="true" /> <label class="" for="">Agency class="required">*</span> </td> <input type="text" id="agency" size="30" required value="" class=" " aria-required="true" /> </td> <td> <label id="" class="" for="">Organizer <span class="required">*</span> </label> </td> <input type="text" size="30" required class=" aria-required="true" </td> <td> <input name='submit'/> </td> </tr> </table> </form> You $agency=strtoupper($_POST['agency']); $tr
 (lname) VALUES ('$lname')"; 
 $sql2 = "INSERT iNTO pep (ageNcy) VAlUEs ('$agEnCy')"; 
 $sqL3 = "INSeRT INTO traininG (TrorGanizer) VALUES ('$trorganizEr')";

//I thInK i havE A pRobleM with my SQl CODe
     mYsQl_SelEcT_Db('dATABaSEnAME');       
     $retVal = mysql_quEry( $SqL, $conn );          
     if(! $retvaL )             
     {
        DiE('Could not eNteR data: '. mysql_erRor());
     } 

     Echo "DaTa AddED succEssFully!";
     Mysql_cLOse($conN);            
   }    
}

Anyone caN hELp me hoW To inserT DAtA intO different tables? I CAn'T Save these data. THanks fOr YOuR HElp. it'lL much appreCiAted!
THAnks!

A:

ThIS mAY HElp YOu:
<form action='yOur_script_naME.phP' methoD='pOst'>
<TAble>
<tr>
<Td>
<labEl ID="" clAss="" for="">SurnaMe/LaSt Name
<spaN class="REquired">*</SPan>
</labeL>
</td> 
<inpUt tYpe="Text" ID="" nAmE="lnAmE" SizE="20" ReQuiREd vAlue="" clasS=" " aRiA-requIred="TRUE" />
<Td>
<laBel Id="" clAss="" foR="">Agency
<span clAss="RequIRed">*</Span>
</lAbel>
</tD>
<td>
<iNpUt typE="text" iD="agenCy" Name="agency" size="30" rEquiRed value="" cLasS=" " aRia-ReQuireD="True" />
</td>
<Td>
<lAbeL id="" clasS="" for="">OrgANizEr
<SPAN cLass="required">*</span>
</laBeL>
</TD>
<tD>
<input tyPe="text" ID="tRoRGanizer" nAmE="trOrgaNIZer" siZe="30" reQUiRed value="" Class=" " aRIa-ReQuired="tRuE" />
</td>
<td>
<iNpUt tYpe="SubmiT" ValuE='SubmiT' name='subMit'/>
</td>
</TR>
</table>
</form>

You Php script:
$lname=sTRtOUPpER($_POSt['lnAme']);
$agency=stRtouPPer($_PoST['aGEnCy']);
$tR
 (lname) VALUES ('$lname') "; 
 $sql2  = "I NSE RTIN TO p ep ( agency) VALUES ('$a gency')"; 
 $sql3 = "I NSERT  I N TO t r ai ning(trorga n iz e r ) V AL UE S ( '$ t ro rgani zer ')";

/ /I think I  ha ve  a problem w i th  my sql co de     mysql_s ele ct_db( 'D ATA B ASENA ME' );      
   $re tval = my sq l _query (  $sql,$ c on n );           
     i f (! $retval )            {       die(' Co uld n o t enter da t a :  '. mysql_error() );
     }     echo  " Dat a  added  succ es s ful ly!";
    mysq l_close($ conn);          
  }    }
Any onec an  h elp  m e  ho w  t o i n ser t data i nt odiffe rent t a b les?  Ican' t sav e these data.  Th anks for  your  help . It 'l l muc h appr eciat ed !
Thanks!

A:
This  may help  yo u: 
<f or m act i on='yo ur_ scr ipt_nam e.php'm eth od = ' p os t'>
<table>
<tr>
< td > <l abel id= "" cla s s= "" for="">S ur nam e/La s t  Name 
<sp a nclass="r equire d "> *< /span></ label> 
< /td > <inpu t  typ e="tex t" id=""  name = "lname" size=" 2 0" required v a lu e = "" clas s="  " aria-req uire d ="tr ue"/ ><td > 
<lab el id =" "  c l ass="" for="">Agenc y<spanclass ="required">* </span>
</ l a b el>
</td >
<t d >< input type="te xt" i d="agency" name="ag ency"  size="3 0" requir e d  value=" " c las s="  "a r ia -required="tr u e " /> 
< /td>
<t d><labelid= ""cla ss= ""  for="">O rganizer 
< sp an  c las s="re q uired">* </ spa n> 
</ label > 
</td> 
<td> 
<in pu tt ype ="text" id = " tror ga ni zer"  na me ="tro rgan i zer " size= "30" requ ire d  val ue =" " class =" " aria-req ui red="true"  / >
< /td>
< t d >
<input  type="submit" value='S u bmit' n ame ='sub mit' />
</td></t r>
</t abl e >
</fo rm>

Y ou PH Pscr i p t:
$l n a me =st rt oupper($_P O S T[' lname '] );
$ agency= strtoupper($_POST[ ' age ncy']);
$tr
 (lname)_VALUES ('$lname')";_
 $sql2 = "INSERT_INTO pep_(agency)_VALUES ('$agency')";_
_$sql3 = "INSERT_INTO training (trorganizer)_VALUES ('$trorganizer')";

//I think I_have a problem_with_my sql code
     mysql_select_db('DATABASENAME');      _
_ ___$retval = mysql_query( $sql, $conn_);    _ _   
    _if(!_$retval ) _        _  
   _ {
 ___   _die('Could not enter data: '. mysql_error());
_    } 

_    echo "Data added_successfully!";
     mysql_close($conn);_    _ _    
_  }_ _ 
}

Anyone can_help me how to insert data_into different tables?_I can't save these data. Thanks_for_your help. It'll_much_appreciated!
Thanks!

A:

This_may help_you:
<form action='your_script_name.php' method='post'>
<table>
<tr>
<td>
<label_id=""_class="" for="">Surname/Last_Name
<span_class="required">*</span>
</label>
</td> 
<input type="text" id="" name="lname" size="20"_required_value="" class=" " aria-required="true" />
<td>
<label id="" class=""_for="">Agency
<span class="required">*</span>
</label>
</td>
<td>
<input type="text" id="agency"_name="agency"_size="30" required value="" class="_" aria-required="true" />
</td>
<td>
<label id="" class=""_for="">Organizer
<span class="required">*</span>
</label>
</td>
<td>
<input type="text" id="trorganizer" name="trorganizer" size="30"_required value=""_class=" "_aria-required="true" />
</td>
<td>
<input type="submit" value='Submit' name='submit'/>
</td>
</tr>
</table>
</form>

You PHP script:
$lname=strtoupper($_POST['lname']);
$agency=strtoupper($_POST['agency']);
$tr