Example #1
0
        }
        ?>
							<td  align='center' class='black'><?php 
        echo $data['page_type'];
        ?>
</td>
							</tr>

							<?php 
        $i++;
    }
    ?>
							</table>
						<input type="submit"  value="Update Priority" name="priority" />
						</td></tr>
		</table>
		</form>
<?php 
}
disconnectdb($cn);
?>
				</td></tr>
				
					
			</table>
		</td>
	</tr>
</table>
		
<?php 
include "footer.php";
Example #2
0
<?php

session_start();
require_once '../connect.php';
if (!empty($_POST['name']) && !empty($_POST['pword'])) {
    if ($database == null) {
        connectdb();
    }
    $result = mysqli_query($database, "SELECT * FROM user WHERE username='******'name'] . "' and password='******'pword']) . "'");
    if (mysqli_num_rows($result) > 0) {
        $row = mysqli_fetch_assoc($result);
        $_SESSION['id'] = $row['user_id'];
        $_SESSION['uname'] = $row['username'];
        $_SESSION['role'] = $row['role'];
        disconnectdb();
        header("Location: ../index.php");
    } else {
        disconnectdb();
        header("Location: ../index.php?set=1");
    }
}