Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/11/2012, 09:59
flowerstar
 
Fecha de Ingreso: octubre-2012
Ubicación: Mexico DF
Mensajes: 9
Antigüedad: 11 años, 6 meses
Puntos: 0
problemas con php, mysql, jpgraph

hola amigos soy nueva en este foro y les pido ayuda para solucionar mi problema;
estoy haciendo un reporteador y mi problema es al crear las graficas, pues me marca error en la declaracion de mis variables me dice Undefined variable.

aqui les dejo mi codigo, estoy usando jpgraph, php y mysql


<?php
$fechaIn=$_POST['fechaIn'];
$fechaTe=$_POST['fechaTe'];


require_once ('../jpgraph/src/jpgraph.php');
require_once ('../jpgraph/src/jpgraph_pie.php');
require_once ('../jpgraph/src/jpgraph_pie3d.php');

$conexion =mysql_connect("xxx","xxx","xxx");
mysql_select_db("grafica", $conexion);

$consulta=mysql_query("select candidato, votos from encuesta where '$fechaIn' and '$fechaTe'");

while ($filas=mysql_fetch_array($consulta)) {
$votos[]=$filas['votos'];
$candidato[]=$filas['candidato'];

}

$data = array ($votos);

$graph= new PieGraph(430,250);
$graph->SetShadow();

$theme_class=new VividTheme;
$graph->SetTheme($theme_class);

$graph->legend->SetAbsPos (10,130, 'right', 'bottom');
$graph->legend->SetFrameWeight (1);
$graph->legend->SetColumns (1);
$graph->legend->SetMarkAbsSize (20);

$graph->title->Set("ENCUESTA");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->img->SetImgFormat("png");

$p1= new PiePlot3d($data);

$p1->SetCenter(0.35);
$p1->ExplodeAll(10);
$p1->SetHeight(20);

$p1->value->SetFont(FF_FONT1,FS_BOLD);
$p1->value->SetColor("darkred");
$p1->SetLabelPos(0.5);
$p1->value->SetFormal('%.2f%%');
$p1->SetLegends($candidato);

$p1->ShowBorder();
$p1->SetColor('black');

$graph->Add($p1);
$graph->Stroke();

mysql_close($conexion);

?>


los errores que me marca son :

1..
A PHP Error was encountered

Severity: Notice

Message: Undefined index: fechaIn

Filename: views/ddd.php

Line Number: 2


2.

A PHP Error was encountered

Severity: Notice

Message: Undefined index: fechaTe

Filename: views/ddd.php

Line Number: 3

3..

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: votos

Filename: views/ddd.php

Line Number: 20


PD: antes tengo un formulario que ingresa la fecha de inicio y la fecha final, con los datos ingresados se sacara la grafica.

me podrian decir porque me marca estos errores?? gracias anticipadamente