connect forms through php and primary key -


i'm trying connect forms using 1 of inputs form of primary key.

for example,

---first form primary key taken

form1.php  

---second form, page1 based on input form1

form2.php?page1=primary key  

---third form, page1 based on input form2

form3.php?page2=primary key  

---fourth form, page2 page1

form4.php?page3=primary key  

---fourth form, page3 page2

and on, until last page. question how connect them? how retrieve primary , pass on form involved? far can pass primary key form2, when reaches form3, disappears.

by way, after each form accomplished, proceeds process page.

---below code sample form

<form id="form1" name="form1" method="post" action="eval_2.php">             <table width="100%" border="0" cellpadding="2" cellspacing="0">              <tr>             <td width="70%">             <strong>1. quality of work </strong><br />             - refers his/her ability work thoroughness.             </td>             <td align="center"> <select name="qualityremark">               <option>select remark</option>               <option>o</option>               <option>vs</option>               <option>s</option>               <option>us</option>               <option>p</option>             </select></td>             </tr>              <tr>             <td width="70%" height="10%"> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; a. works outstandingly accurate , complete in details</td>             <td width="30%" align="left"> o - outstanding </td>             </tr>             <tr>             <td width="70%"> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; b. thorough work; commit errors</td>             <td width="30%" align="left"> vs - satisfactory </td>             </tr>             <tr>             <td width="70%"> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; c. completes work few errors</td>             <td width="30%" align="left"> s - satisfactory </td>             </tr>             <tr>             <td width="70%"> &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; d. work incomplete, inaccurate</td>             <td width="30%" align="left"> - unsatisfactory</td>             </tr>             <tr>             <td width="70%"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e. careless work; errors repeated</td>             <td width="30%" align="left"> p - poor</td>             </tr>             <tr>             <td> comments: </td>             <td></td>             </tr>             <tr>             <td><textarea name="qualitycomment" cols="80" rows="5" id="qualitycomment"></textarea></td>             </tr>             </table>                 <tr>             <td></td>             <td><div align="right">             <a href="performanceeval.php">back</a>&nbsp;|&nbsp;             <!--<a href="performanceeval3.php">next</a> -->             <input type="submit" value="next" name="next" id="next" class="silver_button"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td>             </tr><br />              </form>  

---below code process page

require_once("dbconnect_gentemplate.php"); require_once("attendanceclass.php");  $newacct= new attendance(); $m=$newacct->eval_2();  $current=$_get['page1'];   header("location: performanceeval3.php?page2=$current"); 

---below code function

function eval_2(){ //page 2  $current=$_get['page1'];  // $command="select recentact ojt_evaluation"; // $commando=mysql_query($command) or die("error ".mysql_error()); // $commander=mysql_fetch_array($commando);  // $current=$commander['recentact']; // $cur=md5($current);   if(isset($_post['next'])){      $qualityremark=$_post['qualityremark'];     $qualitycomment=$_post['qualitycomment'];      if(trim($qualityremark)=="") return  "<p>error creating account;blank qualityremark</p>";      $sql="update ojt_evaluation set qualityremark='$qualityremark', qualitycomment='$qualitycomment' student='$current'";      $query=mysql_query($sql)or die ("error".mysql_error());     }     // header("location: performanceeval3.php?session=$current"); } 

where did go wrong? should do? help!

i think didn't pass query string

in below variable null there no parameter value assign page1

 $current=$_get['page1']; 

and 1 more think submit button click action of form in loaded

may u try this

<form id="form1" name="form1" method="post" action="eval_2.php?page1=form1"> 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -