Exercice Jqplot 1

introduction :

6 cases récupèrent des variables post en php.

Ce sont les x et y du graphe jqplot qui se génére après un clic sur le bouton :

Attention, cela ne fonctionne qu’avec l’option PHP registers_globals sur ON.

http://huleuxnicolas.free.fr/jqplot/exercice1.php

jqplot

Code :

</pre></pre></pre>
<pre></pre></pre>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
<BODY BGCOLOR="#e7dfce">
<meta http-equiv="content-type" content="text/html;charset=iso-8859-15" />

<FONT size="1pt" face="arial" >

<fieldset> <center>Génération de graphs jqplot1 Ex 1</center> </fieldset>
 <script language="javascript" type="text/javascript" src="jquery.min.js"></script>
 <script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script>
 <link rel="stylesheet" type="text/css" href="jquery.jqplot.css" /><center>
 <script type="text/javascript">

$(function () {
 $.jqplot('chartdiv', [
 [
 [<? echo $_POST['var1']?>,<? echo $_POST['var2']?>],
 [<? echo $_POST['var3']?>,<? echo $_POST['var4']?>],
 [<? echo $_POST['var5']?>,<? echo $_POST['var6']?>],
 ]
 ]);
});

&nbsp;
 </script>
 </head>
 <body>
<div id="chartdiv" style="height:400px;width:300px; "></div>

&nbsp;

&nbsp;

<fieldset>

<center>

<table border="0" cellspacing="2" cellpadding="2">

&nbsp;

&nbsp;

<form action="exercice1.php" method="post" >

Point 1

<font size=1><input type="text" name="var1" style="width:100px; height:20px;">X1 <label for="nom">
<form action="exercice1.php" method="post" >

<font size=1><input type="text" name="var2" style="width:100px; height:20px;">Y1 <label for="nom">

<br>

Point 2
 <form action="exercice1.php" method="post" >

<font size=1><input type="text" name="var3" style="width:100px; height:20px;">X2 <label for="nom">

&nbsp;

<form action="exercice1.php" method="post" >

<font size=1><input type="text" name="var4" style="width:100px; height:20px;">Y2 <label for="nom">

<br>
Point 3

<form action="exercice1.php" method="post" >

<font size=1><input type="text" name="var5" style="width:100px; height:20px;">X3 <label for="nom">

&nbsp;

<form action="exercice1.php" method="post" >

<font size=1><input type="text" name="var6" style="width:100px; height:20px;">Y3 <label for="nom">
</table>

</center>

</fieldset>

<center>Générer le Graphe</center> <form action="exercice1.php" method="post" enctype="multipart/form-data">

<center><input type ="submit" name="Generer" value="Generer" /> </center>

</fieldset> <br></br>

&nbsp;

<?

&nbsp;

&nbsp;
<pre><pre>
Publicités