<?php
// Copyright Andrew Gilbert
session_start();
include("graph.class.php");
$graph = new graph;
$x = $_GET['x'];
$y = $_GET['y'];

// plots the line based on $_GET variables
$graph->plotLine($_GET['x'], $_GET['y'], $_GET['move']);
echo("<iframe src=\"graph.php\" width=\"100%\" height = \"100%\"></iframe><br>\n");

echo("Use the links below to get a line of best fit.<br>\n");
echo("<A href=\"plot.php?x=" . $x . "&y=" . $y . "&move=4\">Steepen Gradient</a><br>\n");
echo("<A href=\"plot.php?x=" . $x . "&y=" . $y . "&move=-4\">Flatten Gradient</a><br>\n");

?>