PHP Classes

File: insert.php

Recommend this page to a friend!
  Classes of Nuno Tiago  >  PHP MySQL Quiz class  >  insert.php  >  Download  
File: insert.php
Role: Example script
Content type: text/plain
Description: Insert questions to mysql
Class: PHP MySQL Quiz class
Manage questions and user answers stored in MySQL
Author: By
Last change:
Date: 8 years ago
Size: 2,087 bytes


Class file image Download

require 'sql_class.php';

$add = new user();
$add->add_question($q,$f_p,$s_p,$t_p,$four_p,$d,$c) == true)
"<p align='center'>One more</p>";


<meta charset="iso-8859-15">
<title>Inserir Perguntas</title>
<link href='' rel='stylesheet' type='text/css'>
<style type="text/css">

    width: 800px;
    margin: 20px auto;
    font-family: 'Stint Ultra Expanded', cursive;
    border:2px black;
    box-shadow: 0px 0px 30px rgba(48, 50, 50, 0.85);
    padding: 20px 0 20px 0;
    margin-bottom: 10px;



<div id="content">
<form method="POST">

<legend>Insert Question:</legend>
<textarea type="text" style="width:100%;" name="pergunta" maxlength="100" required></textarea>

<legend>Insert possible answers:</legend>
<label>1) possible answer: </label><input type="text" name="first" required><br>
<label>2) possible answers:</label><input type="text" name="second" required><br>
<label>3) possible answers:</label><input type="text" name="third" required><br>
<label>4) possible answers:</label><input type="text" name="four" required><br>

<select name="dificulty">
<option value="easy">easy</option>
<option value="midlle">midlle</option>
<option value="hard">hard</option>

<legend>Correct is:</legend>
<label>Resposta answer:</label><input type="text" name="correct" required>

<p align="center">
<input type="submit" value="Introduzir"><input type="reset">





For more information send a message to info at phpclasses dot org.