Past Paper Code
Past Paper Code
Past Paper Code
php
$num = 4;
$factorial = 1;
?>
<html>
<head>
</head>
<body>
<form method="post">
</form>
<?php
if($_POST){
$fact = 1;
$number = $_POST['number'];
//start loop
?>
</body>
</html>
<html>
<head>
</head>
<body>
<table border="1">
<tr>
</tr>
<tr>
<td>
<table>
<tr>
<td>Code</td>
</td>
</tr>
<tr>
<td>Title</td>
</td>
</tr>
<tr>
<td>Alt_Title</td>
</td>
</tr>
<tr>
<td>Type</td>
</td>
</tr>
<tr>
<td>Synopis</td>
</td>
</tr>
<tr>
<td>Num_Eps</td>
</td>
</tr>
<tr>
<td>Duration</td>
<td><input type="time" name="Duration" size="">
</td>
</tr>
<tr>
<td>Total_Duration</td>
</td>
</tr>
<tr>
<td>Catagory</td>
</td>
</tr>
<tr>
<td>Year</td>
</td>
</tr>
<tr>
<td></td>
name="submit" value="Sent"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
insert:
<?php
mysql_connect("localhost","root","root");//database connection
mysql_select_db("test");
$Code = $_GET['Code'];
(Code, Title, Alt_Title, Type, Synopsis, Num_Eps, Duration, Total_Duration, Catagory, Year)
VALUES
if($result){
} else{
mysql_close($mysql_connect);
$con = mysql_connect("localhost","root","root");
if (!$con)
mysql_select_db("test");
$Code = $_GET['Code'];
if(isset($_POST['GenCode']))
foreach($_POST['GenCode'] as $value) {
mysql_query($insert);
echo $insert;
echo " ";
mysql_close($con);
?>