Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/06/2007, 07:59
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: ¿Cómo enviar datos de un formulario para hacer graficas con JGRAPH?

A que te refieres con enviar y que no salga el error? Es bastante sencillo:
Formulario:
Código HTML:
<form action="tupagina.php" method="post">
<input type="text" name="valor1" />
<input type="text" name="valor2" />
<input type="submit" name="enviar" value="Generar" />
</form> 
tupagina.php:
Código PHP:
<?php
include ("jpgraph.php");
include (
"jpgraph_line.php");

$ydata  = array($_POST['valor1'], $_POST['valor2'] );
$graph  = new Graph(350250,"auto");    
$graph->SetScale"textlin");
$lineplot =new LinePlot($ydata);
$lineplot ->SetColor("blue");
$graph->Add$lineplot);
$graph->Stroke();
?>