john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

php css draw line

<html> <head> </head>
<body>
<?php



if( !isset($_POST['startx']) || empty($_POST['startx']) || !isset($_POST['starty']) || empty($_POST['starty']) || !isset($_POST['endx']) || empty($_POST['endx']) || !isset($_POST['endy']) || empty($_POST['endy'])
  )

{
    print '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
    print "\n<br \>";
    print 'Starting X Point<input name="startx" type="text">';
    print "\n<br \>";
    print 'Starting Y Point<input name="starty" type="text">';
    print "\n<br \>";
    print 'End X Point<input name="endx" type="text">';
    print "\n<br \>";
    print 'End Y Point<input name="endy" type="text">';
    print "\n<br \>";
    print '<input type="submit" /></form>';
    print "\n<br \>";
}
else{

    $startx = (int) htmlentities( $_POST['startx'] );
    $starty = (int) htmlentities( $_POST['starty'] );
    $endx = (int) htmlentities( $_POST['endx'] );
    $endy = (int) htmlentities( $_POST['endy'] );


    print "\n<br />";
    print $startx . "," . $starty . "  " . $endx . "," . $endy;
    print "\n<br />";
    print "width: " . ($endx - $startx);
    print "\n<br />";
    print "height: " . ($endy - $starty);
    print "\n<br />";
    print "acos(startx): " . acos($startx);

    print "\n<br />";

    } //end of if-else user filled in textarea
?>

</body></html>

  • « php dirs and paths
  • php create tabs »

Published

Feb 6, 2010

Category

php

~122 words

Tags

  • css 19
  • draw 3
  • line 31
  • php 82