473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

when the first field value is given how to display the remaining values automaticaly

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript" src="datetimepicker.js">
  4. function validation() {
  5.     document.form2.flag.value="insert";
  6.     document.form2.submit();
  7. }
  8. </script>
  9. </head>
  10. <body bgcolor=#c3e393>
  11. <?php 
  12. include("dbconnection.php");
  13. $txtname=$_POST['txtname'];
  14. $txtdivision=$_POST['txtdivision'];
  15. $txtdept=$_POST['txtdept'];
  16. $txthod=$_POST['txthod'];
  17. $txtsdate=$_POST['txtsdate'];
  18. $txtfdate=$_POST['txtfdate'];
  19. $txtbudget=$_POST['txtbudget'];
  20. $txtpriority=$_POST['txtpriority'];
  21. $txtpcode=$_POST['txtpcode'];
  22. $txtsname=$_POST['txtsname'];
  23. $txtptype=$_POST['txtptype'];
  24. $txturl=$_POST['txturl'];
  25. $txtstatus=$_POST['txtstatus'];
  26. $flag=$_POST['flag'];
  27. $query=pg_query("INSERT INTO project(projname,division,department,startdate,finishdate,budget,priority,projectcode,shortname,projecttype,url,status,hod) VALUES ('$txtname','$txtdivision','$txtdept','$txtsdate','$txtfdate','$txtbudget','$txtpriority','$txtpcode','$txtsname','$txtptype','$txturl','$txtstatus','$txthod')");
  28. ?>
  29. <form name="form2" method="POST" action="project.php" >
  30. <input type="hidden" name="flag" value="<?php echo $flag; ?>">
  31. <table align=center>
  32. <h2 align=center>Project Details</h2>
  33. <tr>
  34. <td>
  35. <strong>Project code :<strong>
  36. </td>
  37. <td>
  38. <input id="pcode" type=text name="txtpcode" value="<?php echo $txtpcode; ?>"/>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td>
  43. <font size=3>
  44. <strong>Name of the Project :</strong>
  45. </td>
  46. <td>
  47. <input id="name" type=text name="txtname" value="<?php echo $txtname; ?>"/>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td>
  52. <strong>Short Name :<strong>
  53. </td>
  54. <td>
  55. <input id="sname" type=text name="txtsname" value="<?php echo $txtsname; ?>"/>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. <font size=3>
  61. <strong>Division :</strong>
  62. </td>
  63. <td>
  64. <input id="division" type=text name="txtdivision" value="<?php echo $txtdivision; ?>"/>
  65. </td>
  66. </tr>
  67. <tr>
  68. <td>
  69. <font size=3>
  70. <strong>Department :</strong>
  71. </td>
  72. <td>
  73. <input id="dept" type=text name="txtdept" value="<?php echo $txtdept; ?>"/>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>
  78. <font size=3>
  79. <strong>Department HOD :</strong>
  80. </td>
  81. <td>
  82. <input id="hod" type=text name="txthod" value="<?php echo $txthod; ?>"/>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>
  87. <font size=3>
  88. <strong>Start Date :</strong>
  89. </td>
  90. <td>
  91. <input id="demo1" type="text" name="txtsdate" value="<?php echo $txtsdate; ?>"><a href="javascript:NewCal('demo1','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>
  96. <strong>Target Finish Date :<strong>
  97. </td>
  98. <td>
  99. <input id="demo2" type="text" name="txtfdate" value="<?php echo $txtfdate; ?>"><a href="javascript:NewCal('demo2','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
  100. </td>
  101. </tr>
  102.  
  103.  
  104. <tr>
  105. <td>
  106. <strong>Budget :<strong>
  107. </td>
  108. <td>
  109. <input type="checkbox" name="txtbudget" value="y" /> yes
  110. <input type="checkbox" name="txtbudget" value="n" /> no
  111. </td>
  112. </tr>
  113.  
  114.  
  115. <tr>
  116. <td>
  117. <strong>Priority :<strong>
  118. </td>
  119. <td>
  120. <select name="txtpriority">
  121. <option value="1">Low</option>
  122. <option value="2">Medium</option>
  123. <option value="3">High</option>
  124. </select></div>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td>
  129. <strong>Project Type :<strong>
  130. </td>
  131. <td>
  132. <input id="ptype" type=text name="txtptype" value="<?php echo $txtptype; ?>"/>
  133. </td>
  134. </tr>
  135.  
  136. <tr>
  137. <td>
  138. <strong>URL of the project :<strong>
  139. </td>
  140. <td>
  141. <input id="url" type=text name="txturl" value="<?php echo $txturl; ?>"/>
  142. </td>
  143. </tr>
  144.  
  145. <tr>
  146. <td>
  147. <strong>Status :<strong>
  148. </td>
  149. <td>
  150. <select name="txtstatus">
  151. <option value="1">initialization</option>
  152. <option value="2">Study</option>
  153. <option value="3">SRS</option>
  154. <option value="4">Design</option>
  155. <option value="5">Coding</option>
  156. <option value="6">Testing</option>
  157. <option value="7">Implementation</option>
  158. </select>
  159. </td>
  160. </tr>
  161. </table>
  162. <center>
  163. <table>
  164. <tr>
  165. <td><input type=button value="Submit" name="b1" onClick="return validation()";/></td>
  166. <td><input type="Reset" name="b2"></td>
  167. </tr>
  168. </table>
  169. </center>
  170. </form>
  171. </body>
  172. </html>
Apr 23 '12 #1
1 1248
johny10151981
1,059 1GB
code dump, you expect people to read this ****
Apr 23 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: phatnugs420 | last post by:
Hi thanks for the help in advanced!.. To further explain what i want it to do is: go from: Body Conscious 1815 Division St # 101 Nashville TN, 37203 615-321-8555 <blank field>
5
by: Dragan Matic | last post by:
If I have a table t with column c which is defined as char(5) and fill it with following values: insert into t (c) values (' 1') insert into t (c) values (' 2') insert into t (c) values...
1
by: Dragan Matic | last post by:
If I have a table t with column c which is defined as char(5) and fill it with following values: insert into t (c) values (' 1') insert into t (c) values (' 2') insert into t (c) values...
3
by: Grayscale | last post by:
Hello, When I execute the code below, I get: "Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters." error message in the first line. Rs.Open...
15
by: Dave | last post by:
I am getting the error above intermittantly with an ASP 3.0 page using an MS Access 2003 database. I have searched Google extensively and found the following possible causes for this error: A...
2
by: jkwang | last post by:
I am trying to create a form where the value of 1 field limits the value options of a 2nd field. For example: Say I have a database of inventory in 5 warehouses. I want to create a form that will...
1
by: tomzji | last post by:
I am using Sql server 2005. I have one table named 'tblJob'. This table have two fields say 'Staus' and 'ExpiryDate'. when 'Expirydate' come to less than current date, i want to upadte 'Status'...
5
by: canajien | last post by:
I am trying to get a script to show a particular image when a field value = 1, otherwise it will show something else, and this is what I came up with: $i=0; while ($i < $num) { ...
3
by: kingparthi | last post by:
This is a program to add, display & delete an item from the double linked list ... Here the add & display works correctly... where my delete is having some problem, when ever I delete an item, it...
3
by: Indrajit Chakraborty | last post by:
I am developing a simple web site in ASP. I have a web page which has a form, and I want to set the values of two text box to 2 fields selected by a query. One of the fields is a name field which has...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.