ragazzi questo è il codice delle 2 pagine:
la prima pagina è valida_servizi.php:
Codice PHP:
<?php
include ("checkuser.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Virtual Credits - home</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="HAPedit 3.0">
<style type="text/css" media="screen">
@import "css/stile.css";
</style>
</head>
<body>
<div id="container">
<div id="header">
</div>
<a name="val"></a>
<div id="navigatione">
<h3>[img]icons/user.png[/img] logged as <?php echo $_SESSION["admin"]; echo " - your V.O. is ", $_SESSION["vir_org"]; echo " - latest access ", @$_SESSION["vecchia"]?></h3>
</div>
<div id="content">
<div class="textimage">
<h2> Services validation </h2>
<?php
/* Connessione e selezione del database */
$connessione = mysql_connect("localhost", "root", "") or die (
"Connection refused: " . mysql_error());
mysql_select_db('crediti');
$query = "SELECT servizio.nome, servizio.data, servizio.nome_lab FROM servizio WHERE servizio.validazione = '0' AND servizio.nome_vo = '".$_SESSION["vir_org"]."'";
$result = mysql_query($query, $connessione) or die("nessun risultato" . mysql_error());
$tuple = mysql_num_rows ($result);
//echo "You have [b]$tuple[/b] validate messages";
if(mysql_num_rows ($result) > 0)
{
echo "<form action='scelta_val.php' method='post' name='scelta'>";
echo"<table width='100%' border='0'>";
echo "<tr><th align=\"center\"></th><th align=\"center\">Name</th><th align=\"center\">Date</th><th align=\"center\">Laboratory</th></tr>";
while($ris = mysql_fetch_array($result))
{
$nome = $ris["nome"];
$data = $ris["data"];
$lab = $ris["nome_lab"];
echo
"<tr>
<td><div align='center'><input name='checkbox[$nome];' type='checkbox' value='$lab'></div></td>
<td><div align='center'><a href='prova.php?nome=<?=$nome?>' class='top'>$nome</div></td>
<td><div align='center'>$data</div></td>
<td><div align='center'>$lab</div></td>
</tr>";
}
echo"</table>
";
echo "<p class='submit' align='right'><input name='validate' type='submit' value='Validate' /><input name='not_validate' type='submit' value='Not validate' /></p>";
echo "</form>";
if (isset ($_REQUEST["up"]))
{
//echo "[b]session elapsed or user unknown[/b]";
echo "<script type='text/javascript' language='JavaScrip'>var oggetto = new Object();
oggetto.testo = 'Validation complete';
oggetto.funzione = function() {
alert(oggetto.testo);
};
setTimeout(oggetto.funzione, 150);
</script>";
}
else if (isset ($_REQUEST["down"]))
{
//echo "[b]session elapsed or user unknown[/b]";
echo "<script type='text/javascript' language='JavaScrip'>var oggetto = new Object();
oggetto.testo = 'Please choose an element';
oggetto.funzione = function() {
alert(oggetto.testo);
};
setTimeout(oggetto.funzione, 150);
</script>";
}
}
?>
</p>
</div>
<div class="textimage">
<a name="val">
<?php
if($nome <> NULL)
{
//echo $_SESSION["nome"];
}
?>
</a>
</div>
</div>
<div id="extra">
<div class="newsbox">
<h2>Documentation</h2>
[img]icons/page_white_acrobat.png[/img]Download
official documentation in pdf format </p>
</div>
<div class="newsbox">
<h2>Job statistic </h2>
[img]icons/statistic.png[/img]View
the Grid statistic (update every 108 minutes) </p>
</div>
<div class="newsbox">
<h2>Link</h2>
<div align="center">[img]images/egee_logo_blue_bg.gif[/img]
<map name="Map">
<area shape="rect" coords="0,1,103,52" href="#">
</map>
</div>
<div align="center">[img]images/infngridlogo.jpg[/img]
<map name="Map2">
<area shape="rect" coords="1,0,108,52" href="#">
</map>
</div>
</div>
</div>
<div id="navigation">
<ul id="navigazione">
<li id="home">[url="home.php"]Home[/url]
<li id="laboratory">[url="laboratorio.php"]Laboratories[/url]
<li id="superuser">[url="membro.php"]Superuser[/url]
<li id="credits">[url="credito.php"]Credits[/url]
<li id="logout">[url="logout.php"]Logout[/url]
[/list]
</div>
<div id="footer">---</div>
</div>
</body>
</html>
la seconda pagina è prova.php
Codice PHP:
<?php
// inizio sessione
session_start ();
echo $_GET["nome"];
?>
come vedete nella pagina prova.php ho inserito $_GET["nome"] ma nonfunziona niente..
come devo fare??
ciao