|
96 | 96 | <td colspan="0" align="left"><input type="text" name="booktitle" style="width:250px; padding:4px;" value="<?php echo $edit['title']; ?>"></td>
|
97 | 97 | </tr>
|
98 | 98 | <tr>
|
99 |
| -<td >No. of authors </td><td>:</td> |
100 |
| -<td align="left"><input type="text" style="width:250px;padding:4px;" name="authortype" value="<?php echo $edit['type']; ?>"></td> |
101 |
| - |
102 |
| -<?php |
103 |
| - |
104 |
| -?> |
105 | 99 |
|
106 | 100 |
|
107 | 101 | <td >Book Author(s)</td><td>:</td>
|
108 |
| -<td align="left"><input type="text" style="width:250px;padding:4px;" name="author" value="<?php echo $edit['author_name']; ?>"></td> |
| 102 | +<td align="left" width="200px"><input type="text" style="width:250px;padding:4px;" name="author" value="<?php echo $edit['author_name']; ?>"></td> |
| 103 | +<td align="left">[if multiple, seperate with ","(comma)]</td> |
| 104 | + |
109 | 105 | </tr>
|
110 | 106 | <tr>
|
111 | 107 | <td>
|
|
151 | 147 | </td>
|
152 | 148 | <?php
|
153 | 149 |
|
154 |
| -$branch_id="1"; |
155 | 150 |
|
156 | 151 | switch ($branch_name) {
|
157 | 152 | case "Oak Lawn":
|
|
173 | 168 | }
|
174 | 169 | ?>
|
175 | 170 | <td ></td><td></td>
|
176 |
| -<td align="left">[if multiple, seperate with ","(comma)]</td> |
177 | 171 |
|
178 | 172 | </tr>
|
179 | 173 |
|
|
251 | 245 | $insert1="Insert into book(book_id,title)
|
252 | 246 | values('$_POST[book_id]','$_POST[booktitle]')";
|
253 | 247 |
|
254 |
| -$insert2="Insert into book_copies(book_id, branch_id, no_of_copies) |
255 |
| - values('$_POST[book_id]',".$branch_id.",'$_POST[copies]')"; |
256 | 248 |
|
257 |
| -$insert3="Insert into book_authors(book_id, author_name, type) |
| 249 | +$insert2="Insert into book_authors(book_id, author_name, type) |
258 | 250 | values('$_POST[book_id]','$_POST[author]','".$auth_type."')";
|
| 251 | +$insert3="Insert into book_copies(book_id, branch_id, no_of_copies) |
| 252 | + values('$_POST[book_id]',".$branch_id.",'$_POST[copies]')"; |
259 | 253 |
|
260 | 254 |
|
261 | 255 |
|
|
264 | 258 | $rs3=mysql_query($insert3) or die(mysql_error());
|
265 | 259 |
|
266 | 260 | if($rs1 && $rs2 && $rs3){ ?>
|
267 |
| - |
268 |
| - <script> |
| 261 | +<script> |
269 | 262 | $(document).ready(function(){
|
270 | 263 | $("#success").fadeIn(1000);
|
271 | 264 | });
|
|
308 | 301 | </tr>
|
309 | 302 | </table>
|
310 | 303 | </div>
|
311 |
| -<div style="width:300px; float:left; margin-left:20px; margin-top:10px;"> |
312 |
| -<table border="0"> |
313 |
| -<tr> |
314 |
| -<td> </td> |
315 |
| -</tr> |
316 |
| -</table> |
317 |
| -</div> |
318 |
| - |
319 | 304 | </form>
|
320 | 305 |
|
321 | 306 |
|
|
0 commit comments